From 90b4cf72924a01d384d8c4a03e82efc4b5dca40c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 5 Oct 2015 05:52:35 +0200 Subject: [PATCH] No need to check for overlap when determining value for `unadjusted` Since setting only changes behavior if there actually is an overlap. --- src/path/PathItem.Boolean.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/path/PathItem.Boolean.js b/src/path/PathItem.Boolean.js index fd20bffe..1963079d 100644 --- a/src/path/PathItem.Boolean.js +++ b/src/path/PathItem.Boolean.js @@ -577,10 +577,8 @@ PathItem.inject(new function() { + ', seg wi:' + seg._winding + ', next wi:' + nextSeg._winding + ', seg op:' + isValid(seg, true) - + ', next op:' + (isValid(nextSeg, - !strict && inter._overlap) - || nextInter && isValid(nextInter._segment, - !strict && nextInter._overlap)) + + ', next op:' + (isValid(nextSeg, !strict) || nextInter + && isValid(nextInter._segment, !strict)) + ', seg ov: ' + (seg._intersection && seg._intersection._overlap) + ', next ov: ' + (nextSeg._intersection @@ -609,9 +607,8 @@ PathItem.inject(new function() { || (!strict || isValid(seg, true)) // Even if next segment is not valid, its to which // we may switch might be, so count that too! - && (isValid(nextSeg, !strict && inter._overlap) - || nextInter && isValid(nextInter._segment, - !strict && nextInter._overlap)) + && (isValid(nextSeg, !strict) || nextInter + && isValid(nextInter._segment, !strict)) ) ? inter // If it's no match, check the next linked intersection first,