Skip to content

Commit

Permalink
Slider step not working properly when equal to min
Browse files Browse the repository at this point in the history
  • Loading branch information
enchev committed Nov 20, 2024
1 parent bb52179 commit 1dfc967
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Radzen.Blazor/wwwroot/Radzen.Blazor.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,13 @@ window.Radzen = {
var percent = isVertical ? (parent.offsetHeight - handle.offsetTop - offsetY) / parent.offsetHeight
: (Radzen.isRTL(handle) ? parent.offsetWidth - handle.offsetLeft - offsetX : handle.offsetLeft + offsetX) / parent.offsetWidth;

var newValue = Math.max(min, Math.min(percent, max)) * (max - min) + min;
if (percent > 1) {
percent = 1;
} else if (percent < 0) {
percent = 0;
}

var newValue = percent * (max - min) + min;

if (
slider.canChange &&
Expand Down

0 comments on commit 1dfc967

Please sign in to comment.