Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added an option to call a function when the handle is moved #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions angular.rangeSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: '@',
Expand Down Expand Up @@ -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,
Expand Down