I can't get this to work properly. My alert message keeps reading out -1 for some reason.
XML
|
Quellcode
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<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>
|
JS
|
Quellcode
|
1
2
3
4
|
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!