1
0
mirror of https://github.com/svg/svgo.git synced 2025-07-29 20:21:14 +03:00

Reset current cursor on Z

Ref https://github.com/svg/svgo/issues/1510
This commit is contained in:
Bogdan Chadkin
2021-08-13 18:34:12 +03:00
parent 179ca5c60f
commit 9e578b515a
2 changed files with 32 additions and 0 deletions

View File

@ -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;
}