kimoa / svg-edit

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

Editing imported SVGs with <symbols> included causes some major issues #762

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We have a few illustrations in the IAN library that have <symbol> tags to 
reduce file size.

Try clicking the Edit Online link from (you'll need to be logged in):
http://ian.umces.edu/imagelibrary/displayimage-search-0-6363.html

and then try importing via the image library interface: 
Human > Industry:Agriculture > Maize/corn crop

Behavior is slightly different in each case, but try breaking link and 
ungrouping and you'll see what I mean. 

In the first case, if you break link on a single corn stalk, it moves the 
orginal (pushes it behind the soil) and creates a duplicate in a much moved 
position.

In the second case, it gets really messy with most of the other corn stalks 
disappearing. 

I can make sure that none of our illustrations have <symbol> tags, but it would 
increase file size and seems the wrong way to go.

Original issue reported on code.google.com by adrianbj...@gmail.com on 19 Jan 2011 at 11:40

GoogleCodeExporter commented 9 years ago
Ok this is weird, but it turns out that Inkscape has exactly the same behavior 
with the duplication, dropping behind of the original and moving the duplicated 
version (which by the way, is the one with the link to symbol/reference element 
broken.

Illustrator one the other hand handles everything perfectly!

Original comment by adrianbj...@gmail.com on 20 Jan 2011 at 12:51

GoogleCodeExporter commented 9 years ago
Sorry - for the sake of having our illustrations work, I am going to replace 
any of these with embedded <symbol> tags, so I am attaching the SVG in question 
so that it can be tested once it has been replaced in our library. 

Original comment by adrianbj...@gmail.com on 20 Jan 2011 at 1:13

Attachments:

GoogleCodeExporter commented 9 years ago
Unrelated to the problem, but good god, each corn stalk has 416 paths just for 
the corn kernels on the ears of corn! Someone might want to optimize there. :)

Original comment by adeve...@gmail.com on 21 Jan 2011 at 3:18

GoogleCodeExporter commented 9 years ago
Wow - I hadn't actually noticed that - rather ridiculous given that most of the 
kernels are overlapping so much that you can't distinguish them. I'll get that 
sorted for sure.

Original comment by adrianbj...@gmail.com on 21 Jan 2011 at 3:28

GoogleCodeExporter commented 9 years ago
Actually it gets worse, all 24 stalks as well as the soil appear twice in the 
code, with each  overlapping the copy exactly. So in your example the stalk 
isn't pushed back, it just reveals the copy behind the soil. :)

Original comment by adeve...@gmail.com on 31 Jan 2011 at 5:29

GoogleCodeExporter commented 9 years ago
Really sorry about that example - seems like it was a total mess all around. 
The new version in the library is now much better :)

Back to the bug at hand I should have investigated with something more simple. 
To that end, try that attached svg. It includes a symbol with two <use> tags. 
When you break link, they move position - happens in Chrome and FF4.

Original comment by adrianbj...@gmail.com on 31 Jan 2011 at 5:47

Attachments:

GoogleCodeExporter commented 9 years ago
Should be fixed in r1958.

Thanks for the new test file, that made things a lot easier. :) But I'm happy 
to say the problem has been fixed for both files now. Turns out it was two 
different problems, but I believe both have now been fixed.

Actually Chrome for me is showing a weird bug upon importing that test file, 
but that looks like a different issue entirely...

Original comment by adeve...@gmail.com on 31 Jan 2011 at 6:25

GoogleCodeExporter commented 9 years ago
Nice work! Just noticed the issue with importing in Chrome. I had only "opened" 
that test file before, so didn't notice the weird sizing issue you are talking 
about when "importing".

Original comment by adrianbj...@gmail.com on 31 Jan 2011 at 6:38

GoogleCodeExporter commented 9 years ago
Split out the sizing issue when importing with Chrome into Issue857

Original comment by adrianbj...@gmail.com on 23 Sep 2011 at 5:12