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

Range not working when range spans hundreds to thousands. #13

Closed molnar closed 10 years ago

molnar commented 10 years ago

First, Great directive!

$scope.rangeValue = "999;1700"; //not working, single range tip $scope.rangeValue = "1000;1700"; //not working, single range tip $scope.rangeOptions = { from: 700, to: 2100, step: 1,
smooth: true,
dimension: " mb" };

molnar commented 10 years ago

Rather: $scope.rangeValue = "999;1700"; //not working, single range tip $scope.rangeValue = "1000;1700"; //working $scope.rangeOptions = { from: 700, to: 2100, step: 1, smooth: true, dimension: " mb" };

When a range spans three digits to four, the range options seems to fail. Can create a plunkr if needed.

Thanks!

darul75 commented 10 years ago

I check soon to reproduce it and keep you in touch. I know many improvements needed but code difficult to maintain sometimes :)

darul75 commented 10 years ago

Reproduced and identified issue, fixing it.

darul75 commented 10 years ago

hi,

could your copy paste this new version into your app and feedback me then:

https://raw.githubusercontent.com/darul75/ng-slider/master/src/ng-slider.js

suggestion : your selected range is quite big and combined with a small step to difficult to match all mouse positions (depending of screen resolution), some options:

molnar commented 10 years ago

Yup, that work wonderfully. Thank you! In my application the range is from 900 to 1050, i just noticed that when it spanned 1000, it had a bug.

Again, thank you for the fix, huge help!

darul75 commented 10 years ago

glad to hear it was ok, not forget there are stars in the sky and on github too ;)