Skip to content

Commit da32318

Browse files
committed
Cleanup rangeslider draw and reorder draw call
1 parent 9facc51 commit da32318

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/components/rangeslider/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = {
2020
supplyLayoutDefaults: supplyLayoutDefaults
2121
};
2222

23-
function draw(gd, minStart, maxStart) {
23+
function draw(gd) {
2424
if(!gd._fullLayout.xaxis) return;
2525

2626
var fullLayout = gd._fullLayout,
@@ -41,7 +41,7 @@ function draw(gd, minStart, maxStart) {
4141
var height = (fullLayout.height - fullLayout.margin.b - fullLayout.margin.t) * options.thickness,
4242
offsetShift = Math.floor(options.borderwidth / 2);
4343

44-
if(sliderContainer[0].length === 0 && !fullLayout._hasGL2D) createSlider(gd, minStart, maxStart);
44+
if(sliderContainer[0].length === 0 && !fullLayout._hasGL2D) createSlider(gd);
4545

4646
// Need to default to 0 for when making gl plots
4747
var bb = fullLayout.xaxis._boundingBox ?

src/plot_api/plot_api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ Plotly.plot = function(gd, data, layout, config) {
245245

246246
function drawAxes() {
247247
// draw ticks, titles, and calculate axis scaling (._b, ._m)
248-
RangeSlider.draw(gd);
249248
return Plotly.Axes.doTicks(gd, 'redraw');
250249
}
251250

@@ -310,6 +309,7 @@ Plotly.plot = function(gd, data, layout, config) {
310309
Shapes.drawAll(gd);
311310
Plotly.Annotations.drawAll(gd);
312311
Legend.draw(gd);
312+
RangeSlider.draw(gd);
313313
RangeSelector.draw(gd);
314314
}
315315

0 commit comments

Comments
 (0)