_tracePaths: Avoid traversing to visited segments

This commit is contained in:
hkrish 2014-02-03 21:55:01 +01:00
parent dfd1c97a4f
commit 2121b564d0

View file

@ -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.