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

Skip to content

Commit 7538338

Browse files
committed
Cache the selected rangeslider containers in drawData
1 parent 00355fb commit 7538338

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/plot_api/plot_api.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ Plotly.plot = function(gd, data, layout, config) {
282282
// Now plot the data
283283
function drawData() {
284284
var calcdata = gd.calcdata,
285-
i;
285+
i,
286+
rangesliderContainers = fullLayout._infolayer.selectAll('g.rangeslider-container');
286287

287288
// in case of traces that were heatmaps or contour maps
288289
// previously, remove them and their colorbars explicitly
@@ -302,7 +303,7 @@ Plotly.plot = function(gd, data, layout, config) {
302303
.selectAll(query)
303304
.remove();
304305

305-
fullLayout._infolayer.selectAll('g.rangeslider-container')
306+
rangesliderContainers
306307
.selectAll(query)
307308
.remove();
308309
}

0 commit comments

Comments
 (0)