How to keep plugin enabled.

  • Hello.

    I would like to enable drag cursor into the tour. The problem I am having is that every time I go to next view it comes back to original way of navigation. I would like to click on the hand and have it pressed after going to next panorama.

    Part of the code I am using:


    Code
    <!-- events to change the fullscreen buttons, set cursor on start -->	<events name="buttonevents" keep="true" 	        onxmlcomplete="if(istouchdevice, set_drag_cursor(), set_qtvr_cursor() );"	        onenterfullscreen="set(layer[openfs].visible,false); set(layer[closefs].visible,true);"	        onexitfullscreen ="set(layer[openfs].visible,true);  set(layer[closefs].visible,false);"	        />


    I assume that I should change something around onxmlcomplete but I really have no clue what exactly :)


    any help would be appreciated.


    Since this is my first post, small introduction. My name is Marcin and I do virtual tours as a hobby for quite a time.


    Best Regards
    Marcin

  • Hi Klaus,
    thank you for the reply.

    No that is not what I would like to achieve. If I press once button I want it to stay pressed after loading next pano. Your sollution made drag always enabled, but when I click to qtvr way of looking around I will use it untill I go to next panorama and then drag mode is on.

    I want user to choose one way of looking around and have that choice selected when new panorama is displayed.

  • Hi,

    okay, this was a misunderstanding .

    The reason that it will be always set the setting back to the start setting, is that the onxmlcomplete event will be called again and again when loading new scenes.

    One solution would be to remove the onxmlcomplete event (set to null) after the first call - e.g.
    <events name="buttonevents" keep="true"
    onxmlcomplete="if(istouchdevice, set_drag_cursor(), set_qtvr_cursor() ); set(events[buttonevents].onxmlcomplete,null);"
    ...
    />

    Best regards,
    Klaus

  • close, but still not this.

    when I have this code

    <events name="buttonevents" keep="true"
    onxmlcomplete="if(istouchdevice, set_drag_cursor(), set_qtvr_cursor() );
    set(events[buttonevents].onxmlcomplete,null);"
    onenterfullscreen="set(layer[openfs].visible,false); set(layer[closefs].visible,true);"
    onexitfullscreen ="set(layer[openfs].visible,true); set(layer[closefs].visible,false);"
    />
    or when I delete line
    onxmlcomplete="if(istouchdevice, set_drag_cursor(), set_qtvr_cursor() );


    it will change the icon only, and keep it. Now When I go to next panorama I see hand cursor but i am rotating it as it was qtvr way of rotating.

  • Hi,

    then there must be somewhere in your code also an other setting or action that changes the control.mousetype setting...
    This or the MERGE or KEEPCONTROLS flag is missing when loading new scenes/panos.

    Given a concrete answer would be only possible when knowing the full tour source code of course.

    Best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!