@@ -377,7 +377,9 @@ function drawRangePlot(rangeSlider, gd, axisOpts, opts) {
377377
378378 Cartesian . rangePlot ( gd , plotinfo , filterRangePlotCalcData ( calcData , id ) ) ;
379379
380- if ( isMainPlot ) plotinfo . bg . call ( Color . fill , opts . bgcolor ) ;
380+ // no need for the bg layer,
381+ // drawBg handles coloring the background
382+ if ( isMainPlot ) plotinfo . bg . remove ( ) ;
381383 } ) ;
382384}
383385
@@ -404,10 +406,9 @@ function drawMasks(rangeSlider, gd, axisOpts, opts) {
404406 . classed ( constants . maskMinClassName , true )
405407 . attr ( { x : 0 , y : 0 } ) ;
406408
407- maskMin . attr ( {
408- height : opts . _height ,
409- fill : constants . maskColor
410- } ) ;
409+ maskMin
410+ . attr ( 'height' , opts . _height )
411+ . call ( Color . fill , constants . maskColor ) ;
411412
412413 var maskMax = rangeSlider . selectAll ( 'rect.' + constants . maskMaxClassName )
413414 . data ( [ 0 ] ) ;
@@ -416,13 +417,14 @@ function drawMasks(rangeSlider, gd, axisOpts, opts) {
416417 . classed ( constants . maskMaxClassName , true )
417418 . attr ( 'y' , 0 ) ;
418419
419- maskMax . attr ( {
420- height : opts . _height ,
421- fill : constants . maskColor
422- } ) ;
420+ maskMax
421+ . attr ( 'height' , opts . _height )
422+ . call ( Color . fill , constants . maskColor ) ;
423423}
424424
425425function drawSlideBox ( rangeSlider , gd , axisOpts , opts ) {
426+ if ( gd . _context . staticPlot ) return ;
427+
426428 var slideBox = rangeSlider . selectAll ( 'rect.' + constants . slideBoxClassName )
427429 . data ( [ 0 ] ) ;
428430
@@ -483,6 +485,8 @@ function drawGrabbers(rangeSlider, gd, axisOpts, opts) {
483485
484486 // <g grabarea />
485487
488+ if ( gd . _context . staticPlot ) return ;
489+
486490 var grabAreaFixAttrs = {
487491 width : constants . grabAreaWidth ,
488492 y : 0 ,
0 commit comments