mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Fix new failing #isCrossing() test-case.
This commit is contained in:
parent
12dbd3eb26
commit
7d25096de6
1 changed files with 8 additions and 4 deletions
|
@ -448,10 +448,14 @@ var CurveLocation = Base.extend(/** @lends CurveLocation# */{
|
|||
// Now pick the other two potential intersecting curves,
|
||||
// and check against each if they are straight:
|
||||
var l = c.getLine(),
|
||||
ca = t1Inside ? c3 : c1,
|
||||
cb = t1Inside ? c4 : c2;
|
||||
return ca.isStraight() && l.intersect(ca.getLine()) ||
|
||||
cb.isStraight() && l.intersect(cb.getLine());
|
||||
l1 = t1Inside ? c3 : c1,
|
||||
l2 = t1Inside ? c4 : c2,
|
||||
straight1 = l1.isStraight(),
|
||||
straight2 = l2.isStraight();
|
||||
if (straight1 || straight2) {
|
||||
return straight1 && l.intersect(l1.getLine()) ||
|
||||
straight2 && l.intersect(l2.getLine());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue