diff --git a/plugins/_applyTransforms.js b/plugins/_applyTransforms.js index 307160da..b08cde02 100644 --- a/plugins/_applyTransforms.js +++ b/plugins/_applyTransforms.js @@ -323,6 +323,11 @@ const applyMatrixToPathData = (pathData, matrix) => { args[6] = y; } + if (command === 'z' || command === 'Z') { + cursor[0] = start[0]; + cursor[1] = start[1]; + } + pathItem.instruction = command; pathItem.data = args; } diff --git a/test/plugins/convertPathData.25.svg b/test/plugins/convertPathData.25.svg new file mode 100644 index 00000000..4b5e262f --- /dev/null +++ b/test/plugins/convertPathData.25.svg @@ -0,0 +1,27 @@ +Current cursor is reset by closepath command with the first moveto coords of segment + +=== + + + + + +@@@ + + + +