• I'm setting up a function to automatically proportionally fit the entire image inside the stage and to resize it automatically as the stage resizes. You can see an example here: sizing issue. (Open in a new window.) Resize the window and the image resizes to fit.

    Trouble is, when you start with the image reduced, the dimensions touching a stage edge has that dimension locked as the maxheight or maxwidth. That really messes up subsequent resizing. See this by reducing the window height or width to really reduce the image size. Reload the page. Now drag the window larger and you should see how sizing gets messed up. Start with the window larger than the image and there is no problem whatsoever.

    Is this expected behavior?

    There is a workaround of sorts: Manually set the maxwidth and maxheight to at least the image width and height but this can be problematic in other areas.

    Here is the sizing algorithm:

Participate now!

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