mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Correctly handle calculation of CurveLocation point in getCurveIntersections().
This commit is contained in:
parent
7f03ff83af
commit
be76cf22bb
1 changed files with 4 additions and 4 deletions
|
@ -148,12 +148,12 @@ function getCurveIntersections(v1, v2, curve1, curve2, locations, _v1t, _v2t,
|
|||
v2Converged = (Math.abs(v2t.t2 - v2t.t1) < EPSILON);
|
||||
if (v1Converged || v2Converged) {
|
||||
var first = locations[0],
|
||||
last = locations[locations.length - 1];
|
||||
if ((!first || !point.equals(first._point))
|
||||
&& (!last || !point.equals(last._point))) {
|
||||
var point = v1Converged
|
||||
last = locations[locations.length - 1],
|
||||
point = v1Converged
|
||||
? curve1.getPointAt(v1t.t1, true)
|
||||
: curve2.getPointAt(v2t.t1, true);
|
||||
if ((!first || !point.equals(first._point))
|
||||
&& (!last || !point.equals(last._point))) {
|
||||
locations.push(new CurveLocation(curve1, null, point, curve2));
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue