mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Prevent CurveLocation#toString() calls in bitwise xor comparison.
See https://twitter.com/juerglehni/status/778962612197453824
This commit is contained in:
parent
dbe3aa42ec
commit
d3ac1b4c94
1 changed files with 3 additions and 1 deletions
|
@ -734,7 +734,9 @@ PathItem.inject(new function() {
|
|||
// the path.
|
||||
return over1 ^ over2
|
||||
? over1 ? 1 : -1
|
||||
: inter1 ^ inter2
|
||||
// NOTE: inter1 & 2 are objects, convert to boolean first
|
||||
// as otherwise toString() is called on them.
|
||||
: !inter1 ^ !inter2
|
||||
? inter1 ? 1 : -1
|
||||
// All other segments, also when comparing two overlaps
|
||||
// or two intersections, are sorted by their order.
|
||||
|
|
Loading…
Reference in a new issue