Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a7c7f0e

Browse files
author
Valentin Hervieu
committed
Fix draggable range when floor is not 0
As explained in angular-slider#172 .
1 parent 680b2a2 commit a7c7f0e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ $scope.slider = {
170170

171171
**stepsArray** - _Array_: If you want to display a slider with non linear/number steps. Just pass an array with each slider value and that's it; the floor, ceil and step settings of the slider will be computed automatically. The `rz-slider-model` value will be the index of the selected item in the stepsArray.
172172

173-
**draggableRange** - _Boolean (defaults to false)_: When set to true and using a range slider, the range can be dragged by the selection bar.
173+
**draggableRange** - _Boolean (defaults to false)_: When set to true and using a range slider, the range can be dragged by the selection bar. _This doesn't work when ticks are shown._
174174

175175
**showSelectionBar** - _Boolean (defaults to false)_: Set to true to always show the selection bar.
176176

dist/rzslider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@
12021202
}
12031203
newMinValue = this.minValue;
12041204
newMinOffset = 0;
1205-
newMaxValue = this.dragging.difference;
1205+
newMaxValue = this.minValue + this.dragging.difference;
12061206
newMaxOffset = this.valueToOffset(newMaxValue);
12071207
}
12081208
else if (newOffset >= this.maxLeft - this.dragging.highDist) {

dist/rzslider.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/rzslider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@
12021202
}
12031203
newMinValue = this.minValue;
12041204
newMinOffset = 0;
1205-
newMaxValue = this.dragging.difference;
1205+
newMaxValue = this.minValue + this.dragging.difference;
12061206
newMaxOffset = this.valueToOffset(newMaxValue);
12071207
}
12081208
else if (newOffset >= this.maxLeft - this.dragging.highDist) {

0 commit comments

Comments
 (0)