plugin scaling or fix aspect.

  • Hi all,
    Can anyone tell me how to scale plugins and keep their position fixed in proportion to screen/window size?
    Here is the relevant tour : http://www.360examples.net/mijas_30/tour.html
    I need the plugins at the bottom left to scale down if viewed on a smaller screen. For instance, if viewed on an ipad in portrait, they bleed over the nav buttons.
    I have the same issue with the thumbs at the top of the screen.

    As always, I'm very grateful for any suggestions.

    Kev

  • Hi,

    there are several solutions possible:

    1. either use percent sizes and positions,

    2. or set the size depending the on the device, e.g.

    Code
    <plugin .... onloaded="if(ismobile, set(scale,0.5);mul(x,0.5);mul(y,0.5); );"  ... />

    3. or use addtional xml tags with the devices setting:

    Code
    <plugin name="button1" ... x="..." y="..." />
    <plugin name="button1" devices="mobile" x="..." y="..." scale="0.5" />

    see also here:
    https://krpano.com/docu/xml/#devices-notes
    https://krpano.com/docu/actions/#isphone

    best regards,
    Klaus

  • Thanks Klaus,
    The % position works for me.
    I had already tried % size but, of course, as the screen became smaller, the plugins maintained their x & y positions and moved further apart. I didn't think about applying % to position also *wacko*
    I would like to do the same with the buttons and the thumbs... where in the code would I need to apply the percentage?

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!