Hi! I want to share a code example of how to show/hide groups of hotspots.
example http://novosibpano.ru/VT/groupHS/
Code
<action name="hide_show" scope="local" args="gr" >
for(set(i,0), i LT hotspot.count, inc(i),
copy(hs, global.hotspot[get(i)]);
txtreplace(dstvar, gr, get(hs.group),);
if(hs.group,
if(dstvar !== gr,
set(hs.enabled, true);
set(hs.visible, true);
,
set(hs.enabled, false);
set(hs.visible, false);
);
);
);
</action>
Alles anzeigen
Add the attribute to hotspots: group="red"
red is the name of the group
To show the group call the action : hide_show('red');
Hide hotspots that belong to other groups, if only they have a group.
To show multiple groups, simply list them in parentheses separated by commas: hide_show('green, red');
Only for local hotspots