Open GoogleCodeExporter opened 8 years ago
After studying the actionscript code, I see that resize events (both on the
flash object and browser window) will lead to
changing the svg.scale. After commenting out these lines (see attached patch),
the behavior of the flash and native rendering
(in FF and Chromium) are the same in the example.
This raises two questions for me:
1. Why is the scale modified upon resizing the object? Is this specified in the
SVG somewhere?
2. How can I turn this off without modifying the flash code?
Turning off the scaling (or at least maintaining aspect ratio) is relevant to
my project, where I'd like to display the svg with
100% width/height relative to the parent div, where the scale should remain
intact when resizing the parent div. Currently, I
use a workaround where I set the svg object to a very large absolute size in
pixels and set the overflow of the parent div to
hidden. However, this gives me strange clipping artifacts in some cases, e.g.:
http://137.120.14.24/wikipathways-
test/wpi/PathwayWidget.php?id=WP1021
Original comment by thomaskelder
on 16 Mar 2010 at 1:04
Attachments:
Some of this behavior was to deal with browser level zooming. Unfortunately, the
resizing code is very complex and I dread digging into it again. But, we need
to make
sure this fundamental behavior is not wrong. Bumping priority to high.
Original comment by grick23@gmail.com
on 29 May 2010 at 5:01
If I had to choose between correct resize behaviour and browser-level zooming,
I would choose resize. Maybe it should be a configuration parameter, just like
"svg.render.forceflash", at least until both can be supported simultaneously.
In my web-app the svgweb box is bound to the size of the browser window
(width:50%;height:50%) and this breaks all of the SVG inside it when in Flash
mode.
Original comment by Yegor.Jb...@gmail.com
on 6 Jan 2011 at 7:36
Original issue reported on code.google.com by
thomaskelder
on 4 Feb 2010 at 2:07Attachments: