From 2121b564d0fb5ffbc214c5924078e9c076ec42c4 Mon Sep 17 00:00:00 2001 From: hkrish Date: Mon, 3 Feb 2014 21:55:01 +0100 Subject: [PATCH] _tracePaths: Avoid traversing to visited segments --- src/path/PathItem.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/path/PathItem.js b/src/path/PathItem.js index 9119f715..ac14dcd6 100644 --- a/src/path/PathItem.js +++ b/src/path/PathItem.js @@ -571,7 +571,8 @@ var PathItem = Item.extend(/** @lends PathItem# */{ } else { nextSeg = null; } - if (!nextSeg || !operator(nextSeg._winding)) { + if (!nextSeg || nextSeg && (nextSeg._visited || + !operator(nextSeg._winding))) { direction = 1; } else { // Switch to the intersection segment.