Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

6av16

Anfänger

  • »6av16« ist der Autor dieses Themas

Beiträge: 6

Wohnort: Kiel

Beruf: Industrial Designer

  • Nachricht senden

1

Mittwoch, 18. November 2020, 11:47

Toggle Autotour with button?

Hi everyone,

I'm using the new Krpano 1.20.8. It has a nice feature that easily allows you to make an autotour from your virtual tour. However I haven't found a way to toggle that effect with a button. I can only activate it by either writing "true" or "false" in the skin settings of the tour.xml.
Is there a way to easily use a button as a layer that enables the user to switch it on or off during the tour? (I'm a newbie at coding)

There is an option to activate and deactivate the autotour by doing a right-click and selecting it in the drop down menu, basically I want exactly that option as a button in the virtual tour.

Thanks!

David

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »6av16« (18. November 2020, 11:58)


2

Mittwoch, 18. November 2020, 13:52

create a button and install onclick="switch(autorotate.enabled);"

3

Sonntag, 22. November 2020, 10:07

Hi,

switching autorotate.enabled works, but there is also a slightly better solution:

Quellcode

1
onclick="if(autorotate.isrotating, autorotate.stop(), autorotate.start() );"


This way the autorotate/autotour starts instantly when enabling it, otherwise it would wait the waittime before it starts after enabling.

Documentation:
https://krpano.com/docu/xml/#autorotate.start

Best regards,
Klaus

4

Montag, 12. April 2021, 10:15

When I pause it, it will still start the rotation. I don't know why *smile*
onclick="if(autorotate.isrotating, autorotate.stop(), autorotate.start() );"

5

Montag, 27. Februar 2023, 11:52

Hi,

switching autorotate.enabled works, but there is also a slightly better solution:

Quellcode

1
onclick="if(autorotate.isrotating, autorotate.stop(), autorotate.start() );"


This way the autorotate/autotour starts instantly when enabling it, otherwise it would wait the waittime before it starts after enabling.

Documentation:
https://krpano.com/docu/xml/#autorotate.start

Best regards,
Klaus

Hi Klaus,
this seams not to work when a waittime >1 is active.
Do you have a solution?

My Code:

Quellcode

1
2
3
4
<events onloadcomplete="set(autorotate.enabled,true);autorotate.start();" />
 <autorotate enabled="true" waittime="5" /> 

<layer name="skin_btn_autorotate"  onclick="if(autorotate.isrotating, autorotate.stop(), autorotate.start() );" />

David_smith

Anfänger

Beiträge: 3

Wohnort: United States

Beruf: Digital Marketer and an Entrepreneur

  • Nachricht senden

6

Dienstag, 21. März 2023, 20:31

Yes, it is possible to create a button in Krpano that toggles the autotour feature on and off. You can do this by adding a button layer to your virtual tour and attaching an onclick event that toggles the value of the "autorotate.enabled" variable between "true" and "false
https://sturdybusiness.com -Sturdy Business helps small businesses grow faster with best practices (without breaking the bank).