Skip to content

Commit 07ec816

Browse files
author
kvindasAB
committed
Adding listeners/logic to re-render the slider on min/max change.
1 parent 1991707 commit 07ec816

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

rzslider.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,25 @@ function throttle(func, wait, options) {
256256
if(newValue === oldValue) return;
257257
thrHigh();
258258
});
259+
260+
261+
this.scope.$watch('rzSliderFloor', function(newValue, oldValue){
262+
if(newValue === oldValue) return;
263+
self.resetSlider();
264+
});
265+
266+
this.scope.$watch('rzSliderCeil', function(newValue, oldValue){
267+
if(newValue === oldValue) return;
268+
self.resetSlider();
269+
});
270+
271+
},
272+
273+
resetSlider: function() {
274+
this.setMinAndMax();
275+
this.calcViewDimensions();
276+
this.updateCeilLab();
277+
this.updateFloorLab();
259278
},
260279

261280
/**

0 commit comments

Comments
 (0)