Skip to content

Commit 2d7fb91

Browse files
author
Valentin Hervieu
committed
6.0.1 release
1 parent 8f51bb2 commit 2d7fb91

8 files changed

+25
-19
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 6.0.1 (2017-02-14)
2+
## Fixes
3+
- Ensure model value is current when custom translate function runs for tick values
4+
15
# 6.0.0 (2017-01-02)
26
## Refactoring
37
- Refactor/simplify the css rules to ease the customisation.

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angularjs-slider",
3-
"version": "6.0.0",
3+
"version": "6.0.1",
44
"homepage": "https://github.com/angular-slider/angularjs-slider",
55
"authors": [
66
"Rafal Zajac <[email protected]>",

dist/rzslider.css

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rzslider.js

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
/*! angularjs-slider - v6.0.0 -
1+
/*! angularjs-slider - v6.0.1 -
22
(c) Rafal Zajac <[email protected]>, Valentin Hervieu <[email protected]>, Jussi Saarivirta <[email protected]>, Angelin Sirbu <[email protected]> -
33
https://github.com/angular-slider/angularjs-slider -
4-
2017-01-02 */
4+
2017-02-15 */
55
/*jslint unparam: true */
66
/*global angular: false, console: false, define, module */
77
(function(root, factory) {
@@ -2054,7 +2054,7 @@
20542054
this.applyLowValue();
20552055
if (this.range)
20562056
this.applyHighValue();
2057-
this.applyModel();
2057+
this.applyModel(true);
20582058
this.updateHandles('lowValue', this.valueToPosition(newMinValue));
20592059
this.updateHandles('highValue', this.valueToPosition(newMaxValue));
20602060
},
@@ -2066,7 +2066,6 @@
20662066
*/
20672067
positionTrackingHandle: function(newValue) {
20682068
var valueChanged = false;
2069-
20702069
newValue = this.applyMinMaxLimit(newValue);
20712070
if (this.range) {
20722071
if (this.options.pushRange) {
@@ -2085,6 +2084,7 @@
20852084
if (this.tracking === 'lowValue' && newValue > this.highValue) {
20862085
this.lowValue = this.highValue;
20872086
this.applyLowValue();
2087+
this.applyModel();
20882088
this.updateHandles(this.tracking, this.maxH.rzsp);
20892089
this.updateAriaAttributes();
20902090
this.tracking = 'highValue';
@@ -2097,6 +2097,7 @@
20972097
else if (this.tracking === 'highValue' && newValue < this.lowValue) {
20982098
this.highValue = this.lowValue;
20992099
this.applyHighValue();
2100+
this.applyModel();
21002101
this.updateHandles(this.tracking, this.minH.rzsp);
21012102
this.updateAriaAttributes();
21022103
this.tracking = 'lowValue';
@@ -2115,13 +2116,14 @@
21152116
this.applyLowValue();
21162117
else
21172118
this.applyHighValue();
2119+
this.applyModel();
21182120
this.updateHandles(this.tracking, this.valueToPosition(newValue));
21192121
this.updateAriaAttributes();
21202122
valueChanged = true;
21212123
}
21222124

21232125
if (valueChanged)
2124-
this.applyModel();
2126+
this.applyModel(true);
21252127
},
21262128

21272129
applyMinMaxLimit: function(newValue) {
@@ -2195,10 +2197,10 @@
21952197
* Apply the model values using scope.$apply.
21962198
* We wrap it with the internalChange flag to avoid the watchers to be called
21972199
*/
2198-
applyModel: function() {
2200+
applyModel: function(callOnChange) {
21992201
this.internalChange = true;
22002202
this.scope.$apply();
2201-
this.callOnChange();
2203+
callOnChange && this.callOnChange();
22022204
this.internalChange = false;
22032205
},
22042206

dist/rzslider.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rzslider.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rzslider.scss

+3-3
Large diffs are not rendered by default.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angularjs-slider",
3-
"version": "6.0.0",
3+
"version": "6.0.1",
44
"description": "AngularJS slider directive with no external dependencies. Mobile friendly!.",
55
"main": "dist/rzslider.js",
66
"repository": {

0 commit comments

Comments
 (0)