Cleanup code.

This commit is contained in:
Jonathan Puckey 2012-04-25 20:47:53 +02:00
parent 10ae88e90c
commit d20fb61c7c
2 changed files with 4 additions and 3 deletions

View file

@ -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

View file

@ -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() {