Skip to content

Commit

Permalink
Reset current cursor on Z
Browse files Browse the repository at this point in the history
Ref #1510
  • Loading branch information
TrySound committed Aug 13, 2021
1 parent 179ca5c commit 9e578b5
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/_applyTransforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
27 changes: 27 additions & 0 deletions test/plugins/convertPathData.25.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9e578b5

Please sign in to comment.