Skip to content

Commit 5a649f0

Browse files
committed
try adding offset to grabbers
1 parent 25b9496 commit 5a649f0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/components/rangeslider/draw.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -276,14 +276,17 @@ function setPixelRange(rangeSlider, gd, axisOpts, opts) {
276276
.attr('x', pixelMax)
277277
.attr('width', opts._width - pixelMax);
278278

279-
var xMin = clampHandle(pixelMin - hw2),
280-
xMax = clampHandle(pixelMax - hw2);
279+
// ..
280+
var offset = 0.5;
281+
282+
var xMin = clampHandle(pixelMin - hw2 + offset),
283+
xMax = clampHandle(pixelMax - hw2 + offset);
281284

282285
rangeSlider.select('g.' + constants.grabberMinClassName)
283-
.attr('transform', 'translate(' + xMin + ',0)');
286+
.attr('transform', 'translate(' + xMin + ',' + offset + ')');
284287

285288
rangeSlider.select('g.' + constants.grabberMaxClassName)
286-
.attr('transform', 'translate(' + xMax + ',0)');
289+
.attr('transform', 'translate(' + xMax + ',' + offset + ')');
287290
}
288291

289292
function drawBg(rangeSlider, gd, axisOpts, opts) {

0 commit comments

Comments
 (0)