mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-13 16:33:28 -04:00
Bring back code removed in 11611c8fe2
again.
But add a _visited check, to get best of both approaches.
This commit is contained in:
parent
00f1d5089f
commit
632eb25f19
1 changed files with 5 additions and 1 deletions
|
@ -680,7 +680,11 @@ PathItem.inject(new function() {
|
|||
// switch at each crossing.
|
||||
drawSegment(seg, other, 'exclude-cross', i, 'green');
|
||||
seg = other;
|
||||
} else if (isValid(other)) {
|
||||
} else if (!seg._visited && isValid(seg)) {
|
||||
// Do not switch to the intersecting segment as this segment
|
||||
// is part of the the boolean result.
|
||||
drawSegment(seg, null, 'keep', i, 'black');
|
||||
} else if (!other._visited && isValid(other)) {
|
||||
// The other segment is part of the boolean result, and we
|
||||
// are at crossing, switch over.
|
||||
drawSegment(seg, other, 'cross', i, 'green');
|
||||
|
|
Loading…
Reference in a new issue