mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-27 14:20:12 -04:00
Remove Curve#isHorizontal() as its implementation and precision is specific to boolean operations.
This commit is contained in:
parent
46d7717812
commit
b6a4815d03
2 changed files with 4 additions and 6 deletions
src/path
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue