Remove Curve#isHorizontal() as its implementation and precision is specific to boolean operations.

This commit is contained in:
Jürg Lehni 2015-01-03 21:02:12 +01:00
parent 46d7717812
commit b6a4815d03
2 changed files with 4 additions and 6 deletions

View file

@ -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;