Placement of buttons on skin_control_bar

  • I'm having trouble moving the zoom and pan buttons in a vtour. I'm editing the vtourskin.xml file to change the x offset for each button, like skin_btn_lt, skin_btn_rt, etc.

    What are these relative to? I managed to move them to the far left and only the zoom in and out remain, though I have all things reset to defaults.

    I'm confused as to if I am changing the wrong settings.
    http://147.126.65.155/pano/vtour/tour.html

  • I'm unable to figure this one out. Do I change the number in "....if(stagewidth LT 400,..." to a higher value? Nothing seems to work?
    Sorry. Thanks.

    <action name="skin_onresize">
    mul(mh, stageheight, -1);
    if(layer[skin_thumbs].state == 'opened', add(mh,layer[skin_thumbs].height); );
    if(layer[skin_map].state == 'opened', sub(hh,stageheight,skin_settings.controlbar_offset); sub(hh,layer[skin_control_bar].height); sub(hh,32); copy(layer[skin_map].height, hh); add(mh,hh); );
    set(layer[skin_scroll_layer].y, get(mh));
    ifnot(device.mobile, if(stagewidth LT 400, skin_showbuttons(true), skin_showbuttons(true)); );
    </action>

  • I'm unable to figure this one out. Do I change the number in "....if(stagewidth LT 400,..." to a higher value?

    What do you want to achieve?

    The code 'if(stagewidth LT 400,' means when the width of the screen/window is smaller than 400px, then the 'then' actions will be executed, and when not then the 'else' actions - see here for the syntax of the if() action:
    https://krpano.com/docu/actions/#if

    Best regards,
    Klaus

  • I put this down for a bit, but now a deadline is approaching.

    I added

    Code
    <action name="skin_startup">
    
    
    		skin_showbuttons();....

    and this does in fact display the buttons regardless of the browser zoom level.

    However, this only works on the local machine, running from file:///C:/inetpub/wwwroot/pano/greenRoomTour/tour.html, not from the http://147.126.65.155/pano/greenRoomTour/tour.html version. The same goes for the scroll wheel zoom functionality within the pano.
    I still also have to address the scroll bar being disabled on the browser window.

    Any advice would be very welcome.
    Best,
    David

  • Hi,

    update the krpano version and the skin,
    and for removing the hiding of the buttons on smaller screens, remove that line from on the skin_onresize action:

    Code
    ifnot(device.mobile, if(stagewidth LT 400, skin_showbuttons(true), skin_showbuttons(true)); );

    Best regards,
    Klaus

Participate now!

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