diff --git a/src/path/Curve.js b/src/path/Curve.js index 759d1313..b500849d 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -301,11 +301,6 @@ var Curve = Base.extend(/** @lends Curve# */{ && this._segment2._handleIn.isZero(); }, - isHorizontal: function() { - return this.isLinear() && Numerical.isZero( - this._segment1._point._y - this._segment2._point._y); - }, - // DOCS: Curve#getIntersections() getIntersections: function(curve) { return Curve.filterIntersections(Curve.getIntersections( diff --git a/src/path/PathItem.Boolean.js b/src/path/PathItem.Boolean.js index 381c1bdb..bacd6543 100644 --- a/src/path/PathItem.Boolean.js +++ b/src/path/PathItem.Boolean.js @@ -124,7 +124,10 @@ PathItem.inject(new function() { length = curveLength / 2; var curve = node.segment.getCurve(), pt = curve.getPointAt(length), - hor = curve.isHorizontal(), + // Determine if the curve is a horizontal linear + // curve by checking the slope of it's tangent. + hor = curve.isLinear() && Math.abs(curve + .getTangentAt(0.5, true).y) <= tolerance, path = curve._path; if (path._parent instanceof CompoundPath) path = path._parent;