Grouping
-
-
Hi,
thanks!
already planned in such or similar waybest regards,
Klaus -
I had the same problem, and found a solution using the "parent" feature, because I noticed that when I make the parent invisible, then all children are invisible as well.
I'm posting it here, hoping it might help someone.
I have a floorplan image defined as a plugin called "map", and I need to be able to show and hide the hotspots on it. So, I made an extra "plugin" layer between the map and the hotspots, called "group". Group's parent is "map". The hotspots' parents are "group". The url for "group" is a transparent gif, and its set to 100% width and height, so that it invisibly covers "map".
In this way, by changing the "visible" state of " group", I can hide all hotspots at once, without hiding the floorplan itself.
Code
Display More<plugin name="map" url="/images/floorplan.png" x="10" y="10" height="40%" width="prop" alpha="0.90" handcursor="false" visible="true" /> <plugin name="group" parent="plugin[map]" url="/images/6pix_transparent.gif" origin="lefttop" edge="lefttop" width="100%" height="100%" /> <style name="buttonstyle" parent="plugin[group]" origin="lefttop" edge="center" /> <plugin name="button001" style="buttonstyle" url="images/hotspot.gif" onclick="action(newPano, Pano001);" x="75.0%" y="43.7%" /> (etc.) <plugin name="button009" style="buttonstyle" url="images/hotspot.gif" onclick="action(newPano, Pano009);" x="15.0%" y="63.2%" /> <action name="showhotspots"> <!-- %1 = true or false --> set(plugin[group].visible, %1); </action>
So, calling action(showhotspots, true|false) will affect all defined hotspots at once, while the map remains unaffected.
-
Note: there is a speed penalty involved with my above method. Everything that is drawn on top of the screen slows down the autorotation, even things that are "invisible". So, don't use this for very large screen areas...
A recursive iteration as Michel has kindly explained here performs much better (but is not as quick to implement perhaps).
-
Hi,
thanks!
already planned in such or similar waybest regards,
KlausHi,
are there any news on this subject? I'm new to KrPano, so I could miss something.
regards,
Myksa
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!