Skip to content

Commit

Permalink
golf
Browse files Browse the repository at this point in the history
  • Loading branch information
leeoniya committed Jul 21, 2021
1 parent 1fc4a07 commit 1832965
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 21 deletions.
9 changes: 4 additions & 5 deletions dist/uPlot.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1554,12 +1554,11 @@ function clipGaps(gaps, ori, plotLft, plotTop, plotWid, plotHgt) {
for (let i = 0; i < gaps.length; i++) {
let g = gaps[i];

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

rect(clip, prevGapEnd, plotTop, g[0] - prevGapEnd, plotTop + plotHgt);

prevGapEnd = g[1];
prevGapEnd = g[1];
}
}

rect(clip, prevGapEnd, plotTop, plotLft + plotWid - prevGapEnd, plotTop + plotHgt);
Expand Down
9 changes: 4 additions & 5 deletions dist/uPlot.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1552,12 +1552,11 @@ function clipGaps(gaps, ori, plotLft, plotTop, plotWid, plotHgt) {
for (let i = 0; i < gaps.length; i++) {
let g = gaps[i];

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

rect(clip, prevGapEnd, plotTop, g[0] - prevGapEnd, plotTop + plotHgt);

prevGapEnd = g[1];
prevGapEnd = g[1];
}
}

rect(clip, prevGapEnd, plotTop, plotLft + plotWid - prevGapEnd, plotTop + plotHgt);
Expand Down
9 changes: 4 additions & 5 deletions dist/uPlot.iife.js
Original file line number Diff line number Diff line change
Expand Up @@ -1565,12 +1565,11 @@ var uPlot = (function () {
for (var i = 0; i < gaps.length; i++) {
var g = gaps[i];

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

rect(clip, prevGapEnd, plotTop, g[0] - prevGapEnd, plotTop + plotHgt);

prevGapEnd = g[1];
prevGapEnd = g[1];
}
}

rect(clip, prevGapEnd, plotTop, plotLft + plotWid - prevGapEnd, plotTop + plotHgt);
Expand Down
2 changes: 1 addition & 1 deletion dist/uPlot.iife.min.js

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions src/paths/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,11 @@ export function clipGaps(gaps, ori, plotLft, plotTop, plotWid, plotHgt) {
for (let i = 0; i < gaps.length; i++) {
let g = gaps[i];

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

rect(clip, prevGapEnd, plotTop, g[0] - prevGapEnd, plotTop + plotHgt);

prevGapEnd = g[1];
prevGapEnd = g[1];
}
}

rect(clip, prevGapEnd, plotTop, plotLft + plotWid - prevGapEnd, plotTop + plotHgt);
Expand Down

0 comments on commit 1832965

Please sign in to comment.