I'm getting up to speed (slowly)...
I tried the following in JS for a hotspot polygon:
var itemPos = krpano.get('hotspot[' + hsName + '].getcenter()');
--> returns null, I was expecting an object with ath and atv
var itemPosY = krpano.get('hotspot[' + hsName + '].getcenter().y');
--> returns null, I was expecting an atv value
If I use .getcenter(ath, atv) in an Action and then use krpano.get(atv) in JS all is well.
How can I do everything in JS? Is it possible? The doc seems to say that it is. (I haven't tried JS from inside an Action yet.)