mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Cleanup code.
This commit is contained in:
parent
10ae88e90c
commit
d20fb61c7c
2 changed files with 4 additions and 3 deletions
|
@ -70,8 +70,9 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
|||
delete this._clockwise;
|
||||
// Curves are no longer valid
|
||||
if (this._curves != null) {
|
||||
for (var i = 0; i < this._curves.length; i++)
|
||||
this._curves[i]._changed(Change.GEOMETRY)
|
||||
for (var i = 0, l = this._curves.length; i < l; i++) {
|
||||
this._curves[i]._changed(Change.GEOMETRY);
|
||||
}
|
||||
}
|
||||
} else if (flags & ChangeFlag.STROKE) {
|
||||
// TODO: We could preserve the purely geometric bounds that are not
|
||||
|
|
|
@ -43,7 +43,7 @@ test('path.curves Synchronisation', function() {
|
|||
path.curves[0].length;
|
||||
ok(path.curves[0]._length, 'Curve length does not appear to be cached');
|
||||
path.scale(2, [0, 0]);
|
||||
equals(path.curves[0].length, 200, 'Curve length should be updated when path is transformed')
|
||||
equals(path.curves[0].length, 200, 'Curve length should be updated when path is transformed');
|
||||
});
|
||||
|
||||
test('path.flatten(maxDistance)', function() {
|
||||
|
|
Loading…
Reference in a new issue