darul75 / angular-awesome-slider

:arrows_clockwise: Angular slider control directive
http://darul75.github.io/angular-awesome-slider/
MIT License
144 stars 63 forks source link

OnMouseUp event doesn't fire when slider is in "realtime" mode #77

Closed nagey closed 9 years ago

nagey commented 9 years ago

the mouseup event won't fire, but the mousemove will. it would be good to get a "final" result of the change or something like that, so that you can act if the user is actively changing the slider, or they're released it.

granted, you can hook on top of this, but would be nice if the directive would give it to you straight.

darul75 commented 9 years ago

hi, I have added a released parameter passed to callback function

$scope.options = {              
    to: 100,
        from: 1,
        step: 1,
        dimension: " km",            
        realtime: true,
    callback: function(value, released) {
           // released true when mouse is up
    }       
};

will it fit your need ?

nagey commented 9 years ago

yes. this is perfect. thank you!

darul75 commented 9 years ago

Ok but let's wait for release I keep you in touch when done in vacation right now ;)

darul75 commented 9 years ago

https://github.com/darul75/ng-slider/releases/tag/2.2.3