diff --git a/src/components/rangeslider/draw.js b/src/components/rangeslider/draw.js index c82c8b6f4be..ded3198d316 100644 --- a/src/components/rangeslider/draw.js +++ b/src/components/rangeslider/draw.js @@ -377,7 +377,9 @@ function drawRangePlot(rangeSlider, gd, axisOpts, opts) { Cartesian.rangePlot(gd, plotinfo, filterRangePlotCalcData(calcData, id)); - if(isMainPlot) plotinfo.bg.call(Color.fill, opts.bgcolor); + // no need for the bg layer, + // drawBg handles coloring the background + if(isMainPlot) plotinfo.bg.remove(); }); } @@ -404,10 +406,9 @@ function drawMasks(rangeSlider, gd, axisOpts, opts) { .classed(constants.maskMinClassName, true) .attr({ x: 0, y: 0 }); - maskMin.attr({ - height: opts._height, - fill: constants.maskColor - }); + maskMin + .attr('height', opts._height) + .call(Color.fill, constants.maskColor); var maskMax = rangeSlider.selectAll('rect.' + constants.maskMaxClassName) .data([0]); @@ -416,13 +417,14 @@ function drawMasks(rangeSlider, gd, axisOpts, opts) { .classed(constants.maskMaxClassName, true) .attr('y', 0); - maskMax.attr({ - height: opts._height, - fill: constants.maskColor - }); + maskMax + .attr('height', opts._height) + .call(Color.fill, constants.maskColor); } function drawSlideBox(rangeSlider, gd, axisOpts, opts) { + if(gd._context.staticPlot) return; + var slideBox = rangeSlider.selectAll('rect.' + constants.slideBoxClassName) .data([0]); @@ -483,6 +485,8 @@ function drawGrabbers(rangeSlider, gd, axisOpts, opts) { // + if(gd._context.staticPlot) return; + var grabAreaFixAttrs = { width: constants.grabAreaWidth, y: 0, diff --git a/test/image/export_test.js b/test/image/export_test.js index 9846c79348f..516178d851e 100644 --- a/test/image/export_test.js +++ b/test/image/export_test.js @@ -19,7 +19,8 @@ var FORMATS = ['svg', 'pdf', 'eps']; // non-exhaustive list of mocks to test var DEFAULT_LIST = [ - '0', 'geo_first', 'gl3d_z-range', 'text_export', 'layout_image', 'gl2d_12' + '0', 'geo_first', 'gl3d_z-range', 'text_export', 'layout_image', 'gl2d_12', + 'range_slider_initial_valid' ]; // return dimensions [in px]