mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Avoid calling #moveTo() twice in SVG 'zm' path data sequence.
This commit is contained in:
parent
db1d87b843
commit
2a08a88461
1 changed files with 1 additions and 1 deletions
|
@ -220,7 +220,7 @@ var PathItem = Item.extend(/** @lends PathItem# */{
|
||||||
coords = part.match(/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g);
|
coords = part.match(/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g);
|
||||||
var length = coords && coords.length;
|
var length = coords && coords.length;
|
||||||
relative = command === lower;
|
relative = command === lower;
|
||||||
if (previous === 'z' && lower !== 'z')
|
if (previous === 'z' && !/[mz]/.test(lower))
|
||||||
this.moveTo(current = start);
|
this.moveTo(current = start);
|
||||||
switch (lower) {
|
switch (lower) {
|
||||||
case 'm':
|
case 'm':
|
||||||
|
|
Loading…
Reference in a new issue