From 72287cf8bcca799259316c235dd9f176523c85ea Mon Sep 17 00:00:00 2001 From: "Wilson Y. Wong" Date: Thu, 2 Apr 2015 10:57:42 -0700 Subject: [PATCH] Added an option to call a function when the handle is moved --- angular.rangeSlider.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/angular.rangeSlider.js b/angular.rangeSlider.js index 611ce7c..26c1ef0 100644 --- a/angular.rangeSlider.js +++ b/angular.rangeSlider.js @@ -119,6 +119,7 @@ modelMin: '=?', modelMax: '=?', onHandleDown: '&', // calls optional function when handle is grabbed + onHandleMove: '&', // calls optional function when handle is moved onHandleUp: '&', // calls optional function when handle is released orientation: '@', // options: horizontal | vertical | vertical left | vertical right step: '@', @@ -504,6 +505,9 @@ $document.bind(moveEvent, function(e) { // prevent default e.preventDefault(); + if (angular.isFunction(scope.onHandleMove)) { + scope.onHandleMove(); + } var currentClick = client(e), movement,