Skip to content

Commit 29a31d5

Browse files
committed
tweak range slider handles for symmetry
1 parent 5a649f0 commit 29a31d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/rangeslider/draw.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ function setPixelRange(rangeSlider, gd, axisOpts, opts) {
279279
// ..
280280
var offset = 0.5;
281281

282-
var xMin = clampHandle(pixelMin - hw2 + offset),
283-
xMax = clampHandle(pixelMax - hw2 + offset);
282+
var xMin = Math.round(clampHandle(pixelMin - hw2)) - offset,
283+
xMax = Math.round(clampHandle(pixelMax - hw2)) + offset;
284284

285285
rangeSlider.select('g.' + constants.grabberMinClassName)
286286
.attr('transform', 'translate(' + xMin + ',' + offset + ')');

0 commit comments

Comments
 (0)