Specify screen percentage for popup windows instead of pixels - how?

  • Hi guys
    I've tried various ways to adjust the width and height of the popup windows, but seems the only input it accepts is pixel resolution. I'dd like to add screen percentage instead. How can I do that?

  • You can use percentage values, like height="80%" width="80%"

    https://krpano.com/docu/xml/#layer.width

    ...This can be an absolute pixel value or a relative (to the screenwidth or screenheight) percent value. When not set - the size of the loaded image will be used.

    ...

    regards
    Piotr

  • Yeah the problem is I dont know where to put it
    For an image popup for example:

    Code
    onclick="popup('image', 'boards/board_01.jpg', 20, 20, true);"


    or

    Code
    onclick="popup('image', 'boards/board_01.jpg', 20%, 20%, true);"


    makes no difference, it still opens as much as the image resolution is


    On the other hand, on a html popup the res works in pixels:

    Code
    onclick="popup('html', get(data[vimeo_01].content), 800, 450, true);"


    but in percentage it doesnt work

    Code
    onclick="popup('html', get(data[vimeo_01].content), 70%, 70%, true);"
  • The easiest way to do it is:

    width=calc(min(width,global.stagewidth*0.9)),
    height=calc(min(height,global.stageheight*0.8)),

    change to

    width=80%,
    height=80%,

    or

    Code
    onclick="popup('html', get(data[vimeo_01].content), 70%, 70%, true);"
    Code
    ...
    width=get(width),  or width=%3, 
    height=get(height), or height=%4,
    ...
  • The easiest way to do it is:

    width=calc(min(width,global.stagewidth*0.9)),
    height=calc(min(height,global.stageheight*0.8)),

    change to

    width=80%,
    height=80%,

    or

    Code
    onclick="popup('html', get(data[vimeo_01].content), 70%, 70%, true);"
    Code
    ...
    width=get(width),  or width=%3, 
    height=get(height), or height=%4,
    ...

    this was enough for me
    width=calc(min(width,global.stagewidth*0.9)),

    well thank you

Participate now!

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