Commit fc9b5211 authored by eli's avatar eli

allowing for configurable update interval

parent bbe0459b
...@@ -232,6 +232,13 @@ function throttle(func, wait, options) { ...@@ -232,6 +232,13 @@ function throttle(func, wait, options) {
*/ */
this.disabled = this.scope.rzSliderDisabled; this.disabled = this.scope.rzSliderDisabled;
/**
* Set the speed at which the slider updates
*
* @type {number}
*/
this.interval = this.scope.rzSliderInterval || 350;
/** /**
* The delta between min and max value * The delta between min and max value
* *
...@@ -330,7 +337,7 @@ function throttle(func, wait, options) { ...@@ -330,7 +337,7 @@ function throttle(func, wait, options) {
self.updateCmbLabel(); self.updateCmbLabel();
} }
}, 350, { leading: false }); }, self.interval, { leading: false });
thrHigh = throttle(function() thrHigh = throttle(function()
{ {
...@@ -339,7 +346,7 @@ function throttle(func, wait, options) { ...@@ -339,7 +346,7 @@ function throttle(func, wait, options) {
self.updateSelectionBar(); self.updateSelectionBar();
self.updateTicksScale(); self.updateTicksScale();
self.updateCmbLabel(); self.updateCmbLabel();
}, 350, { leading: false }); }, self.interval, { leading: false });
this.scope.$on('rzSliderForceRender', function() this.scope.$on('rzSliderForceRender', function()
{ {
...@@ -1414,6 +1421,7 @@ function throttle(func, wait, options) { ...@@ -1414,6 +1421,7 @@ function throttle(func, wait, options) {
rzSliderShowTicks: '=?', rzSliderShowTicks: '=?',
rzSliderShowTicksValue: '=?', rzSliderShowTicksValue: '=?',
rzSliderDisabled: '=?', rzSliderDisabled: '=?',
rzSliderInterval: '@',
}, },
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment