You are not logged in.

1

Monday, October 17th 2016, 9:42am

hide UI with touch event

hi

would it be possible to hide the whole ui with a single click on the pano/tap on touch devices?
i think that would be the easiest way to hide the UI and would not need space for a button on mobile devices.
last week i had an onclick version running, but now it's not working anymore and i don't know why... *confused*

thanks
sven

This post has been edited 1 times, last edit by "sr_raumgleiter" (Oct 17th 2016, 10:06am)


2

Tuesday, October 18th 2016, 9:51am

hi

got a little bit further with that.
now possible to hide ui with an onclick event, still have to hide the hotspots.

my attempt was to use hotspot.count and code a loop that sets the visibility of every hotspot to false.
-> now when i read out the hotspot.count i always get 3 more than i actually have, even if I delete all hotspots i still get 3 in the count.
where are those 3 coming from?

Solved it now with substracting 3 from hotspot.count but still wonder where this 3 hotspots are coming from.

-> As I understand, there is a function in flash version that hides all hotspots at same time, is there also something in html5?

thanks
sven

spacerywirtualne

Professional

Posts: 1,117

Location: Poland, Europe

Occupation: krpano developer : virtual tours : the cms4vr owner

  • Send private message

3

Tuesday, October 18th 2016, 9:56am

In HTML you must use for loop

Source code

1
<action name="hide_show_hotspots">  for(set(i,0),i LT hotspot.count,inc(i),  set(hotspot[get(i)].visible, %1)  ); </action>



Source code

1
hide_show_hotspots(true);

Source code

1
hide_show_hotspots(false);


Piotr
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

4

Tuesday, October 18th 2016, 11:04am

Hi Piotr

thats somehow what i did.
the problem is that when i read the hotspot.count in the for loop i get a different number than i actually have.
so when the for loop is running, it sets the visibility of all hotspots (hotspot1, hotspot2, ..., hotspot7) to false, even though i only have hotspot1 until hotspot4.
therefor my browser crashes when it tries so set those last 3 hotspots (hotspot5, hotspot6, hotspot7) that i don't have to visible=false...

sven

Alexey Tkachenko

Professional

Posts: 770

Location: Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

5

Tuesday, October 18th 2016, 11:26am

Hi)

There're 3 more hotspots which are used in Vr mode - cursor, previous scene and next scene buttons. the way is to check the style of the spots when you toggle their visibility, e.g.:

Source code

1
if(hotspot[get(i)].style == 'skin_hotspotstyle', do_something(););
Regards,

Alexey

6

Tuesday, October 18th 2016, 3:29pm

hi Alexey


thanks for that solution. as I have more than one hotspotstyle in use and need the total count of all hotspots in the scene, I go with my solution of subtracting 3 from hotspot.count
but it's good to know that i can get to specific hotspots over their style attribute.


sven