Skip to content

Commit

Permalink
fix(clipGaps): huge gap dosn't clip over multiple smale gaps
Browse files Browse the repository at this point in the history
  • Loading branch information
Leubeling committed May 16, 2022
1 parent 7c89128 commit 79314f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/paths/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ export function clipGaps(gaps, ori, plotLft, plotTop, plotWid, plotHgt) {

if (g[1] > g[0]) {
let w = g[0] - prevGapEnd;

w > 0 && rect(clip, prevGapEnd, plotTop, w, plotTop + plotHgt);

prevGapEnd = g[1];
if (w > 0){
rect(clip, prevGapEnd, plotTop, w, plotTop + plotHgt);
prevGapEnd = g[1];
}
}
}

Expand Down

0 comments on commit 79314f1

Please sign in to comment.