Move fix for faulty _curves list after calls to Path#reverse() to the right place.

This commit is contained in:
Jürg Lehni 2013-05-03 21:33:17 -07:00
parent f03283804b
commit bd3031cdff
2 changed files with 2 additions and 2 deletions

View file

@ -1109,6 +1109,8 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
segment._handleOut = handleIn;
segment._index = i;
}
// Clear curves since it all has changed.
delete this._curves;
// Flip clockwise state if it's defined
if (this._clockwise !== undefined)
this._clockwise = !this._clockwise;

View file

@ -114,13 +114,11 @@ PathItem.inject(new function() {
var children = path.children, i, len;
for (i = 0, len = children.length; i < len; i++) {
children[i].reverse();
children[i]._curves = null;
}
baseWinding = children[0].clockwise;
} else {
path.reverse();
baseWinding = path.clockwise;
path._curves = null;
}
return baseWinding;
}