Declare outX, outY outside of draw loop, as it is used from previous iteration.

This commit is contained in:
Jürg Lehni 2011-03-06 11:00:25 +00:00
parent 2d2fb400d9
commit b98abeb416

View file

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