Skip to content

Commit 79314f1

Browse files
committed
fix(clipGaps): huge gap dosn't clip over multiple smale gaps
1 parent 7c89128 commit 79314f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/paths/utils.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@ export function clipGaps(gaps, ori, plotLft, plotTop, plotWid, plotHgt) {
162162

163163
if (g[1] > g[0]) {
164164
let w = g[0] - prevGapEnd;
165-
166-
w > 0 && rect(clip, prevGapEnd, plotTop, w, plotTop + plotHgt);
167-
168-
prevGapEnd = g[1];
165+
if (w > 0){
166+
rect(clip, prevGapEnd, plotTop, w, plotTop + plotHgt);
167+
prevGapEnd = g[1];
168+
}
169169
}
170170
}
171171

0 commit comments

Comments
 (0)