I can't get this to work properly. My alert message keeps reading out -1 for some reason.
XML
Code
<hotspot
name="hs"
url="hs.png"
keep="false"
ath="-15" atv="-23"
onclick="openmodal();"
/>
<action name="openmodal">
looktohotspot(get(name), 25, smooth(800,800,800));
js(modalopen);
set(plugin[modalclose].visible, true);
</action>
Display More
JS
Code
function modalopen() {
var hotspotID = krpano().get('hotspot[get(name)].name');
alert(hotspotID);
}
Any other better (or correct) ways to pull the hotspot name through? Thanks!