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

Skip to content

Commit c5c07a5

Browse files
author
Valentin Hervieu
committed
Merge branch 'nibblesnbits-master'
2 parents da7ee44 + 600e453 commit c5c07a5

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed

dist/rzslider.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*! angularjs-slider - v2.3.0 -
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-
2015-12-22 */
4+
2015-12-23 */
55
rzslider {
66
position: relative;
77
display: inline-block;

dist/rzslider.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*! angularjs-slider - v2.3.0 -
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-
2015-12-22 */
4+
2015-12-23 */
55
/*jslint unparam: true */
66
/*global angular: false, console: false, define, module */
77
(function(root, factory) {
@@ -74,7 +74,7 @@
7474
return factory;
7575
})
7676

77-
.value('rzThrottle',
77+
.factory('rzThrottle', ['$timeout', function($timeout) {
7878
/**
7979
* rzThrottle
8080
*
@@ -85,7 +85,7 @@
8585
* @param {ThrottleOptions} options
8686
* @returns {Function}
8787
*/
88-
function throttle(func, wait, options) {
88+
return function(func, wait, options) {
8989
'use strict';
9090
var getTime = (Date.now || function() {
9191
return new Date().getTime();
@@ -109,17 +109,18 @@
109109
context = this;
110110
args = arguments;
111111
if (remaining <= 0) {
112-
clearTimeout(timeout);
112+
$timeout.cancel(timeout);
113113
timeout = null;
114114
previous = now;
115115
result = func.apply(context, args);
116116
context = args = null;
117117
} else if (!timeout && options.trailing !== false) {
118-
timeout = setTimeout(later, remaining);
118+
timeout = $timeout(later, remaining);
119119
}
120120
return result;
121121
};
122-
})
122+
}
123+
}])
123124

124125
.factory('RzSlider', ['$timeout', '$document', '$window', '$compile', 'RzSliderOptions', 'rzThrottle', function($timeout, $document, $window, $compile, RzSliderOptions, rzThrottle) {
125126
'use strict';
@@ -344,15 +345,15 @@
344345
}, true);
345346

346347
this.scope.$watch('rzSliderModel', function(newValue, oldValue) {
347-
if(self.internalChange)
348+
if (self.internalChange)
348349
return;
349350
if (newValue === oldValue)
350351
return;
351352
thrLow();
352353
});
353354

354355
this.scope.$watch('rzSliderHigh', function(newValue, oldValue) {
355-
if(self.internalChange)
356+
if (self.internalChange)
356357
return;
357358
if (newValue === oldValue)
358359
return;
@@ -492,7 +493,7 @@
492493
if (!this.range)
493494
this.maxH.css('display', 'none');
494495
else
495-
this.maxH.css('display', null);
496+
this.maxH.css('display', '');
496497

497498
this.alwaysHide(this.flrLab, this.options.showTicksValues || this.options.hideLimitLabels);
498499
this.alwaysHide(this.ceilLab, this.options.showTicksValues || this.options.hideLimitLabels);
@@ -1345,7 +1346,7 @@
13451346
HOME: this.minValue,
13461347
END: this.maxValue
13471348
},
1348-
key = keys[keyCode],
1349+
key = keys[keyCode],
13491350
action = actions[key];
13501351
if (action == null || this.tracking === '') return;
13511352
event.preventDefault();
@@ -1570,7 +1571,7 @@
15701571
},
15711572

15721573
link: function(scope, elem) {
1573-
return new RzSlider(scope, elem);
1574+
scope.slider = new RzSlider(scope, elem); //attach on scope so we can test it
15741575
}
15751576
};
15761577
}]);

dist/rzslider.min.css

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

0 commit comments

Comments
 (0)