Skip to content

Commit

Permalink
Bring back code removed in 11611c8 again.
Browse files Browse the repository at this point in the history
But add a _visited check, to get best of both approaches.
  • Loading branch information
lehni committed Oct 2, 2015
1 parent 00f1d50 commit 632eb25
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/path/PathItem.Boolean.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 632eb25

Please sign in to comment.