From d20fb61c7ccedd6fca6db10f3885f5ae7d817b41 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Wed, 25 Apr 2012 20:47:53 +0200 Subject: [PATCH] Cleanup code. --- src/path/Path.js | 5 +++-- test/tests/Path_Curves.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/path/Path.js b/src/path/Path.js index 2d2efd36..1bc6b506 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -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 diff --git a/test/tests/Path_Curves.js b/test/tests/Path_Curves.js index 7b21d68f..a358613a 100644 --- a/test/tests/Path_Curves.js +++ b/test/tests/Path_Curves.js @@ -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() {