You are not logged in.

1

Friday, August 21st 2009, 1:00pm

Grouping

It would be great if I can make a group of hotspots or plugins and then I'll call functions for that group.

eg.

Source code

1
2
3
4
5
6
7
8
<plugin name="name1" group="my_group" />
<plugin name="name2" group="my_group" />

...

<action name="name3">
set(group[my_group].visible,false);
</action>



*cool*
*smile* Have a good day!

2

Friday, August 28th 2009, 11:51am

Hi,

thanks!
already planned in such or similar way

best regards,
Klaus

rdhoore108

Trainee

Posts: 89

Location: Belgium

Occupation: Systems and Network Administrator

  • Send private message

3

Thursday, September 9th 2010, 11:08pm

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.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
	<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.
- Ronny D'Hoore

rdhoore108

Trainee

Posts: 89

Location: Belgium

Occupation: Systems and Network Administrator

  • Send private message

4

Monday, September 13th 2010, 2:55pm

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).
- Ronny D'Hoore

5

Wednesday, April 13th 2011, 1:48pm

Hi,

thanks!
already planned in such or similar way

best regards,
Klaus
Hi,

are there any news on this subject? I'm new to KrPano, so I could miss something.

regards,
Myksa