From 0396446c4c8f4c3e43731918fe9b5cb978eb8de6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Thu, 4 Aug 2016 12:34:31 +0200 Subject: [PATCH] Boolean: Clean up previous fix. --- src/path/PathItem.Boolean.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/path/PathItem.Boolean.js b/src/path/PathItem.Boolean.js index d6972901..2bf83305 100644 --- a/src/path/PathItem.Boolean.js +++ b/src/path/PathItem.Boolean.js @@ -784,8 +784,11 @@ PathItem.inject(new function() { other = inter && inter._segment, finished = !first && (isStart(seg) || isStart(other)), cross = !finished && other; - if (first) + if (first) { path = new Path(Item.NO_INSERT); + // Clear branch to start a new one with each new path. + branch = null; + } if (finished) { // If we end up on the first or last segment of an operand, // copy over its closed state, to support mixed open/closed @@ -864,8 +867,6 @@ PathItem.inject(new function() { paths.push(path); } } - // Clear branch so we start with a new one on the next contour. - branch = null; } return paths; }