kahunamoore / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
0 stars 1 forks source link

Support loading files with unit-based width/height #470

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open SVG in v2.5
2.
3.

What is the expected output? What do you see instead?
The drawing is positioned at the top left of the editor area, rather than
within the white canvas area like other SVG files. I have attached the
problem SVG. I have opened others with similar complexity with no issues.

In what browser did you experience this problem? (ALL, Firefox, Opera 10
Alpha, etc)
Only test in FF

Please provide any additional information below.

Original issue reported on code.google.com by adrianbj...@gmail.com on 9 Feb 2010 at 12:32

Attachments:

GoogleCodeExporter commented 9 years ago
This is because the <svg> element has width/height specified in pixels.  If you 
edit
the SVG and remove the 'px' it loads in just fine.

Original comment by codedr...@gmail.com on 9 Feb 2010 at 2:13

GoogleCodeExporter commented 9 years ago
Mostly fixed in r1371 by appropriately converting any unit to user units.

An error does occur if you enter a percentage for width/height without 
including a 
viewBox...not sure how best to handle this. Illustrator sets the page as if the 
percents were px, while Inkscape keeps the percent values as width/height 
attributes, but still shows a page-shaped canvas.

Any suggestions on what we should do?

Original comment by adeve...@gmail.com on 10 Feb 2010 at 6:20

GoogleCodeExporter commented 9 years ago
As of r1406, the following will happen with missing/percentage width/height:

Missing: value will be set to "100"
Percentage: value will be same as value without percentage (i.e. "75%" will be 
"75").

Better ways to deal with this are welcome, but I believe this issue can now be 
closed.

Original comment by adeve...@gmail.com on 17 Feb 2010 at 9:22