Set "stagescale" variable via Javascript from outside (Version 1.16.1)

  • We're embedding our panoramas within a jQuery Mobile page and have scaling issues (i.e. Buttons are much too small) on certain devices. As far as we understand, these issues might be solved by setting the stagescale variable manually.
    How would I accomplish this from outside the tour.html i.e. in the pageshow-jQuery event?

    Or what is the best way to set variables? Is there a small code sample or anything else?

  • Hi,

    either pass the stagescale setting already during embedding:

    Code
    embedpano({..., vars:{stagescale:2.0}});

    or use the onReady embedding callback function and the krpano Javascript interface:
    https://krpano.com/docu/html/#onready

    and then set the stagescale there - e.g.

    Code
    embedpano({..., onready:krpanoReady});
    
    
    function krpanoReady(krpano)
    {
        krpano.set("stagescale", 2.0);
    }

    or add correct viewport settings to get a correct scaling:
    https://krpano.com/docu/html/#mobilenotes

    Best regards,
    Klaus

  • It does seem to have no effect at all - on the Nexus 10 using the Android WebView (Viewport settings (width=device-width, target-densitydpi=device-dpi, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no)) are applied). I've tried it with the static setting inside my vtour.xml, the "vars" way and of course the javascript set in the krpano ready event - nothing.

    Even Pinch-to-Zoom is not working - regardless what I try. Also all the buttons look jugged and jerky - it's working on all other devices but not the Nexus 10 :(

  • Hi,

    OK, although it is working now: the thumbnails are empty. Any idea? I can see only white borders but no thumbnails....

    Use the scrollarea.js from version 1.16.2:
    https://krpano.com/news/#releasenotes1162

    In the previous scrollarea.js version the CSS-3D hardware acceleration was enabled for the scrollarea for HiDPI Android devices to improve the scrolling performance, but it seems that in some cases (to few gpu memory?) the Android WebView just shows notthing, so the 'enabling' of the hardware acceleration was disabled again.

    Best regards,
    Klaus

Participate now!

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