You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Monday, July 9th 2012, 5:06pm

Turning all plugins off/on

My client has asked to have the ability for the user to turn all icons/off/on. Looking through the forum I found this code:



onclick="switch(plugin.visible)"



So created a plugin as below:

<plugin name="off-on"
align="top" x="-50" y="35"
url="../hotspots/off-on.png"
alpha="1.0"
keep="true"
onhover="showtext('turn all hotspots off ',hotspottextstyle);"
onclick="switch(plugin.visible)"
/>




Now my 'stupid' question! - this works fine, but of course the off-on plugin also vanishes, so you cant turn the plugins back on again. *sad*



Any ideas for some simple mods to the above, so that the 'off-on' plugin remains visible.



Thanks in advance *smile*



Tim

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

2

Monday, July 9th 2012, 10:21pm

onclick="switch(plugin.visible);set(plugin[off-on].visible,true);"

easy as pie.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

3

Tuesday, July 10th 2012, 5:36pm

turning off all plugins

Thanks I tried your code:



<plugin name="off-on"
align="top" x="0" y="35"
alpha="0.6"
url="../hotspots/off-on.png"
alpha="0.8"
keep="true"
onhover="showtext('turn buttons off and on ',hotspottextstyle);"
onclick="switch(plugin.visible);set(plugin[off-on].visible,true);"
/>




Afraid it did not work, works fine if I specify each plugin in the switch section! *sad* any ideas? looks like it should work *smile*

Tuur

Sage

Posts: 3,164

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

4

Wednesday, July 11th 2012, 12:46am

Maybe you find a solution here?
http://www.krpano.com/forum/wbb/index.ph…37519#post37519

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

5

Wednesday, July 11th 2012, 2:33am

Hmm well, that's interesting. Try the group plugin code reference by turr.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Posts: 1,081

Location: Russia, Kaliningrad

  • Send private message

6

Wednesday, July 11th 2012, 3:42am

Hi!I think the best solution to hide of plugin group is make group with one parent.
for example:

Source code

1
2
3
4
5
6
<plugin name="group1" url="some_transparent_image.png" keep="true" />
<plugin name="plugin1" parent="group1" url="some_image1.jpg" ...  /> 
<plugin name="plugin2" parent="group1" url="some_image2.jpg" ...  /> 
<plugin name="plugin3" parent="group1" url="some_image3.jpg" ...  /> 
<plugin name="plugin4" parent="group1" url="some_image4.jpg" ...  /> 
<plugin name="on-off" url="on-off-image.jpg" onclick="switch(plugin[group1].visible);" ... />



Hope it help

Regards

Andrey *thumbup*
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

7

Thursday, July 12th 2012, 12:52pm

Thanks Andrey



Will try this out



cheers

Tim