angular-rangeslider
angular-rangeslider copied to clipboard
I have
refinement.children[0].name is considered a string not a number and hence
scope.modelMin = parseFloat((((proposal * range) / 100) + (scope.min)).toFixed(scope.decimalPlaces); is concatinating the values "parseFloat((((proposal * range) / 100)" and "(scope.min)" instead of adding them
so changed it scope.min to int before adding.
What if scope.min is not an integer...?
Wouldn't parseFloat
be better?
Do we also need to apply the same change to modelMax?
You are right it should be parseFloat :-).
modelMax is not causing any problems, may be because there is no arithmetic expression based on in.
However as the code is definitely expecting these variables to be float, I think if we parse all these to floats around line 285, that should take care of this kind of issues for the future.
On Mon, Nov 24, 2014 at 4:40 AM, danielcrisp [email protected] wrote:
What if scope.min is not an integer...?
Wouldn't parseFloat be better?
Do we also need to apply the same change to modelMax?
— Reply to this email directly or view it on GitHub https://github.com/danielcrisp/angular-rangeslider/pull/40#issuecomment-64170121 .