@@ -377,7 +377,9 @@ function drawRangePlot(rangeSlider, gd, axisOpts, opts) {
377
377
378
378
Cartesian . rangePlot ( gd , plotinfo , filterRangePlotCalcData ( calcData , id ) ) ;
379
379
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 ( ) ;
381
383
} ) ;
382
384
}
383
385
@@ -404,10 +406,9 @@ function drawMasks(rangeSlider, gd, axisOpts, opts) {
404
406
. classed ( constants . maskMinClassName , true )
405
407
. attr ( { x : 0 , y : 0 } ) ;
406
408
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 ) ;
411
412
412
413
var maskMax = rangeSlider . selectAll ( 'rect.' + constants . maskMaxClassName )
413
414
. data ( [ 0 ] ) ;
@@ -416,13 +417,14 @@ function drawMasks(rangeSlider, gd, axisOpts, opts) {
416
417
. classed ( constants . maskMaxClassName , true )
417
418
. attr ( 'y' , 0 ) ;
418
419
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 ) ;
423
423
}
424
424
425
425
function drawSlideBox ( rangeSlider , gd , axisOpts , opts ) {
426
+ if ( gd . _context . staticPlot ) return ;
427
+
426
428
var slideBox = rangeSlider . selectAll ( 'rect.' + constants . slideBoxClassName )
427
429
. data ( [ 0 ] ) ;
428
430
@@ -483,6 +485,8 @@ function drawGrabbers(rangeSlider, gd, axisOpts, opts) {
483
485
484
486
// <g grabarea />
485
487
488
+ if ( gd . _context . staticPlot ) return ;
489
+
486
490
var grabAreaFixAttrs = {
487
491
width : constants . grabAreaWidth ,
488
492
y : 0 ,
0 commit comments