From b98abeb4161e3e4d00608b81f9da7b9fd2414954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 6 Mar 2011 11:00:25 +0000 Subject: [PATCH] Declare outX, outY outside of draw loop, as it is used from previous iteration. --- src/path/Path.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/path/Path.js b/src/path/Path.js index 5959298d..e87b3b6d 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -362,8 +362,9 @@ var Path = this.Path = PathItem.extend({ draw: function(ctx, param) { if (!param.compound) ctx.beginPath(); - var segments = this._segments; - var length = segments.length; + var segments = this._segments, + length = segments.length, + outX, outY; for (var i = 0; i < length; i++) { var segment = segments[i], point = segment._point, @@ -383,9 +384,9 @@ var Path = this.Path = PathItem.extend({ ); } } - var handleOut = segment._handleOut, - outX = handleOut.x + x, - outY = handleOut.y + y; + handleOut = segment._handleOut; + outX = handleOut.x + x; + outY = handleOut.y + y; } if (this.closed && length > 1) { var segment = segments[0],