Skip to content

Commit 862465a

Browse files
committed
color range slider mask rect with Color.fill
- so that rgba color is set as: `fill: ${rgb}` + `fill-opacity: ${alpha}` for compatibility with eps/pdf exports
1 parent 375ff11 commit 862465a

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/components/rangeslider/draw.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,9 @@ function drawMasks(rangeSlider, gd, axisOpts, opts) {
406406
.classed(constants.maskMinClassName, true)
407407
.attr({ x: 0, y: 0 });
408408

409-
maskMin.attr({
410-
height: opts._height,
411-
fill: constants.maskColor
412-
});
409+
maskMin
410+
.attr('height', opts._height)
411+
.call(Color.fill, constants.maskColor);
413412

414413
var maskMax = rangeSlider.selectAll('rect.' + constants.maskMaxClassName)
415414
.data([0]);
@@ -418,10 +417,9 @@ function drawMasks(rangeSlider, gd, axisOpts, opts) {
418417
.classed(constants.maskMaxClassName, true)
419418
.attr('y', 0);
420419

421-
maskMax.attr({
422-
height: opts._height,
423-
fill: constants.maskColor
424-
});
420+
maskMax
421+
.attr('height', opts._height)
422+
.call(Color.fill, constants.maskColor);
425423
}
426424

427425
function drawSlideBox(rangeSlider, gd, axisOpts, opts) {

0 commit comments

Comments
 (0)