svgedit icon indicating copy to clipboard operation
svgedit copied to clipboard

W3C example breaks on layer move

Open acefslaser opened this issue 2 years ago • 6 comments

Hi! So while evaluating this project I found a issue on moving layers. Here is the example SVG I am using:

https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/gallardo.svg

Expected behavior I would expect that the whole layer would be moved, not just a part of it.

SVG-Edit environment (IMPORTANT)

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Firefox
  • Version 109

Screenshots

gal1 gal2 gal3

Log

Uncaught TypeError: paint.transform is undefined
    recalculateDimensions http://localhost:8000/packages/svgcanvas/dist/svgcanvas.js:3362
    recalculateDimensions http://localhost:8000/packages/svgcanvas/dist/svgcanvas.js:3336
    recalculateDimensions http://localhost:8000/packages/svgcanvas/dist/svgcanvas.js:3336
    recalculateAllSelectedDimensions http://localhost:8000/packages/svgcanvas/dist/svgcanvas.js:2541
    recalculateAllSelectedDimensions http://localhost:8000/packages/svgcanvas/dist/svgcanvas.js:2541
    mouseUpEvent http://localhost:8000/packages/svgcanvas/dist/svgcanvas.js:2758
    SvgCanvas http://localhost:8000/packages/svgcanvas/dist/svgcanvas.js:5532
    init http://localhost:8000/src/editor/EditorStartup.js:118
    async* http://localhost:8000/src/editor/index.html:36

acefslaser avatar Jan 27 '23 23:01 acefslaser

I found some issues, could you try with the following link? https://deploy-preview-883--svgedit.netlify.app/editor

jfhenon avatar Feb 06 '23 16:02 jfhenon

Definitely seems to have improved the situation, however the geometry on the wheels still breaks:

g1

g2

acefslaser avatar Feb 06 '23 23:02 acefslaser

https://www.w3.org/TR/SVG/implnote.html#ArcConversionCenterToEndpoint Might be of some help, since I believe the wheels are arcs

acefslaser avatar Feb 06 '23 23:02 acefslaser

Do you think you would be able to isolate the issue with a simpler SVG?

jfhenon avatar Feb 07 '23 08:02 jfhenon

Here ya go!:

gallardo-just-wheels

acefslaser avatar Feb 08 '23 19:02 acefslaser

The fix is partial so issue is reopened

jfhenon avatar Mar 30 '23 23:03 jfhenon