"Fit within" / auto-resize?

  • Is there any easy way to fit an image/plugin within the viewer window?

    As in, say, I want the image to resize proportionally, maintaining a certain prescribed minim amount of margin from each of the four viewer boundaries. Or, alternatively, say I want the image to be either 80% wide and/or 80% high, always resizing proportionally, and maintaining these conditions even if the window is resized?

    I don't think I do a good job of explaining what I mean, but I hope you get the idea. So Basically a "fit within" / "auto resizing" within prescribed area, but maintaining aspect ratio, and supporting dynamic resizing of the viewer window.

    Cheers,

    Florian

  • No that's about right. Here's what I use.

  • Hi,

    here some example code:

    Best regards,
    Klaus

  • Thanks Sacha, and thanks Klaus for making me feel (momentarily) as clever as you -- this is quite exactly how I had implemented it last night:

    *smile* *smile*

  • Hello

    I am trying to do the same thing….
    I added another thumbnail that loads a blank pano….
    I used the code to overlay the image and it works fine on desktop.

    I added keep="false" because I want the image to go away when I load another pano….


    Problem is - the image comes in a little big for iPhone/ipad and then it stays when
    I click for a new pano???
    *wacko*

Participate now!

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