AB4D Forum
How do you reset the viewbox to fit content when a rotation is applied? - Printable Version

+- AB4D Forum (https://forum.ab4d.com)
+-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4)
+--- Forum: ZoomPanel (https://forum.ab4d.com/forumdisplay.php?fid=8)
+--- Thread: How do you reset the viewbox to fit content when a rotation is applied? (/showthread.php?tid=202)



How do you reset the viewbox to fit content when a rotation is applied? - JRodman - 11-16-2011

When I apply a rotation to the zoompanel, is there a way to reset the viewbox so that its base size is the size of the content once its rotated?

For example I have content which is rectangular and I rotate it 90 degrees clockwise so its in a landscape (wider than tall) orientation. When it zooms all the way out its fits to the size of the content unrotated when its portrait (taller than wide) orientation. Is there a way to tell it what the correct size is?

As a workaround I simply figured out the minimum zoom scale and start it off at that size but I am sure there has to be a more elegant way.