Start tour with hideable controls hidden o only mobile dev.  

Share your tips and tricks here or get help with any Panotour 2.0+ problem!
No bug reports (of any kind) in this forum!
no avatar
Martas133
New member
 
Topic author
Posts: 5
Likes: 1 post
Liked in: 0 post
Joined: Fri Mar 23, 2018 1:17 pm
Info

Start tour with hideable controls hidden o only mobile dev.

by Martas133 » Thu Jun 14, 2018 8:45 am

Hi, is there any way to start tour with hidden options only on mobile devices (i mean smartphones and tablets) without buying DeviceCheck plugins by Michael Brüning ? I now that there is an option in Properties, but it will start with hidden controls always, even on PC. I now that tour recognize mobile devices because it always displays gyroscop and VR icon only on mobile devices, so is it somehow possible ? Thanks everyone !

User avatar
bdd
Kolor Team
 
Posts: 2788
Likes: 14 posts
Liked in: 126 posts
Joined: Tue Jan 18, 2011 4:05 pm
Info

Re: Start tour with hideable controls hidden o only mobile d

by bdd » Thu Jun 14, 2018 9:39 am

Hello,

Yes it's possible, with following "advanced method" :

  1. Be sure that the option "Start tour with hiddeable controls hidden" is UN-checked
  2. Add the plugin "Call actions on tour events" in your project
  3. Check the "Starting the tour" event
  4. Select the advanced action : "call krpano code"
  5. Enter the following code :
    Code: Select all
    if (device.mobile, hideTourControls(), showTourControls());
  6. Build the tour

Gérald

Martas133 likes this post.

no avatar
Martas133
New member
 
Topic author
Posts: 5
Likes: 1 post
Liked in: 0 post
Joined: Fri Mar 23, 2018 1:17 pm
Info

Re: Start tour with hideable controls hidden o only mobile d

by Martas133 » Thu Jun 14, 2018 11:14 am

Thank you very much for you answer ! It works ! I have one more question, is there some code for hiding either floorplan ? In Floor plan -> Behaviors I have option Start opened checked.
I want floorplan to start opened on PC and on mobile devices closed.
I tried
Code: Select all
if (device.mobile, floorPlanCloseTourFloorPlan(),floorPlanOpenTourFloorPlan());

But it does'nt work.

Thanks !

User avatar
bdd
Kolor Team
 
Posts: 2788
Likes: 14 posts
Liked in: 126 posts
Joined: Tue Jan 18, 2011 4:05 pm
Info

Re: Start tour with hideable controls hidden o only mobile d

by bdd » Thu Jun 14, 2018 12:17 pm

As you want to control the opening by yourself, un-check the "Start opened" property.

And use this code instead of yours :

Code: Select all
if (device.mobile, hideFloorplan(),showFloorplan());


Gérald


Who is online

Users browsing this forum: No registered users and 3 guests