Adapting Inkscape layers (When opening a file, the image is translated out of the canvas) #635
Replies: 6 comments
-
The SVG viewBox is set to -180, -85. Click on the top level group (double-click outside the canvas, then click the map). You will see the X and Y attributes at the top of the screen. Set both to 0. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your help. This works when the svg contains only one canvas. When i have an svg with multiple canvas, each canvas gets translated randomly. You can see the bug with this exemple http://imgh.us/speedometer.svg. Did you ever noticed something like that ? |
Beta Was this translation helpful? Give feedback.
-
I see what you mean. The linked svg file was originally created with Inkscape. Others can chime in, but my understanding is that Inkscape has a lot more features than svgedit and Inkscape files are not necessarily supported. While both produce standard SVG files, they don't have the same format for managing layers. That's why the whole drawing is converted to one layer in svgedit. A layer is just a top-level group element (ex: <g>...</g>). Create a new document in svgedit, add a second layer and look at the source to see the difference. I was able to click on the various grouped objects and zero the x and y to fix the problem. You do have to click on a shape when there is no background rectangle to select. If you have a few files, you could do this by hand. If there are many files, the best solution would be to translate the Inkscape layers to svgedit layers and zero each origin at the same time. You can develop this as an svgedit extension on file load or batch translate all files using XSLT. Maybe someone already has a translator, but I didn't find one with a quick internet search. If some of your files are created with other programs, that's potentially more issues. |
Beta Was this translation helpful? Give feedback.
-
I like the idea of extensions to translate files from other editors to SVG-edit! |
Beta Was this translation helpful? Give feedback.
-
Thank you for your explanation. |
Beta Was this translation helpful? Give feedback.
-
An extension would be great... |
Beta Was this translation helpful? Give feedback.
-
Hi,
When i open some svg files, like this one http://7ktw09.com1.z0.glb.clouddn.com/coastline.svg, the image is out of the editor canvas like in this screenshot http://img15.hostingpics.net/pics/665832bug.png. Am I the only one ?
I am trying to fix it but i don't know what to try first, any clues ?
Beta Was this translation helpful? Give feedback.
All reactions