mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-04 03:45:58 -05:00
Move fix for faulty _curves list after calls to Path#reverse() to the right place.
This commit is contained in:
parent
f03283804b
commit
bd3031cdff
2 changed files with 2 additions and 2 deletions
|
@ -1109,6 +1109,8 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
||||||
segment._handleOut = handleIn;
|
segment._handleOut = handleIn;
|
||||||
segment._index = i;
|
segment._index = i;
|
||||||
}
|
}
|
||||||
|
// Clear curves since it all has changed.
|
||||||
|
delete this._curves;
|
||||||
// Flip clockwise state if it's defined
|
// Flip clockwise state if it's defined
|
||||||
if (this._clockwise !== undefined)
|
if (this._clockwise !== undefined)
|
||||||
this._clockwise = !this._clockwise;
|
this._clockwise = !this._clockwise;
|
||||||
|
|
|
@ -114,13 +114,11 @@ PathItem.inject(new function() {
|
||||||
var children = path.children, i, len;
|
var children = path.children, i, len;
|
||||||
for (i = 0, len = children.length; i < len; i++) {
|
for (i = 0, len = children.length; i < len; i++) {
|
||||||
children[i].reverse();
|
children[i].reverse();
|
||||||
children[i]._curves = null;
|
|
||||||
}
|
}
|
||||||
baseWinding = children[0].clockwise;
|
baseWinding = children[0].clockwise;
|
||||||
} else {
|
} else {
|
||||||
path.reverse();
|
path.reverse();
|
||||||
baseWinding = path.clockwise;
|
baseWinding = path.clockwise;
|
||||||
path._curves = null;
|
|
||||||
}
|
}
|
||||||
return baseWinding;
|
return baseWinding;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue