From a1b0ce3c2481db4b9ecdec718c0077719f268094 Mon Sep 17 00:00:00 2001 From: Chris Bitsakis Date: Thu, 13 Aug 2015 15:06:47 -0400 Subject: [PATCH] #102 - Allow changing step attribute --- rzslider.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rzslider.js b/rzslider.js index 59767e8..0dd7943 100644 --- a/rzslider.js +++ b/rzslider.js @@ -301,6 +301,13 @@ function throttle(func, wait, options) { // Watchers + unRegFn = this.scope.$watch('rzSliderStep', function(newValue, oldValue) + { + if(newValue === oldValue) return; + self.step = newValue; + }); + this.deRegFuncs.push(unRegFn); + unRegFn = this.scope.$watch('rzSliderModel', function(newValue, oldValue) { if(newValue === oldValue) { return; } @@ -1055,7 +1062,7 @@ function throttle(func, wait, options) { scope: { rzSliderFloor: '=?', rzSliderCeil: '=?', - rzSliderStep: '@', + rzSliderStep: '=?', rzSliderPrecision: '@', rzSliderModel: '=?', rzSliderHigh: '=?',