Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4e4f15d

Browse files
committed
clear parcoords canvas specially if there's zero panels as panel redraw loop will not enter the loop body that also clears
1 parent 8a310b3 commit 4e4f15d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/traces/parcoords/lines.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,11 @@ module.exports = function(canvasGL, lines, canvasWidth, canvasHeight, initialDim
365365
}
366366
}
367367

368+
if(panelCount === 0) {
369+
// clear canvas here, as the panel iteration below will not enter the loop body
370+
clear(regl, 0, 0, canvasWidth, canvasHeight);
371+
}
372+
368373
for(I = 0; I < panelCount; I++) {
369374
var panel = panels[I];
370375
var dim1 = panel.dim1;

0 commit comments

Comments
 (0)