diff --git a/src/path/CurveLocation.js b/src/path/CurveLocation.js index ddeae1f1..fcb1180f 100644 --- a/src/path/CurveLocation.js +++ b/src/path/CurveLocation.js @@ -77,6 +77,12 @@ var CurveLocation = Base.extend(/** @lends CurveLocation# */{ this._segment2 = curve._segment2; }, + _setSegment: function(segment) { + this._setCurve(segment.getCurve()); + this._segment = segment; + this._parameter = segment === this._segment1 ? 0 : 1; + }, + /** * The segment of the curve which is closer to the described location. * diff --git a/src/path/PathItem.Boolean.js b/src/path/PathItem.Boolean.js index e749a052..8e44d2a1 100644 --- a/src/path/PathItem.Boolean.js +++ b/src/path/PathItem.Boolean.js @@ -217,10 +217,7 @@ PathItem.inject(new function() { if (noHandles) clearSegments.push(segment); } - // TODO: Move setting of these values to CurveLocation - loc._segment = segment; - loc._parameter = segment === curve._segment1 ? 0 : 1; - loc._version = segment._path._version; + loc._setSegment(segment); // Link the new segment with the intersection on the other curve var inter = segment._intersection; if (inter) {