Venturocket / angular-slider

Slider directive for AngularJS.
MIT License
262 stars 121 forks source link

Different styles for the pointers #70

Closed patrickng closed 9 years ago

patrickng commented 9 years ago

For anyone who is trying to set different styles for the pointers, you will see that when you overlap and drag past the other pointer, the style doesn't swap the first time but the labels and such all do. The fix for this is simple:

In lines 1538-1539 of angular-slider.js, switch it to:

refs.minPtr.removeClass('active').removeClass('high').addClass('low');
refs.maxPtr.addClass('active').removeClass('low').addClass('high');

and in lines 1562-1563, switch it to:

refs.maxPtr.removeClass('active').removeClass('low').addClass('high');
refs.minPtr.addClass('active').removeClass('high').addClass('low');