angular-rangeslider icon indicating copy to clipboard operation
angular-rangeslider copied to clipboard

I have

Open parthbulusu opened this issue 9 years ago • 2 comments

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.

parthbulusu avatar Nov 21 '14 21:11 parthbulusu

What if scope.min is not an integer...?

Wouldn't parseFloat be better?

Do we also need to apply the same change to modelMax?

danielcrisp avatar Nov 24 '14 09:11 danielcrisp

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 .

parthbulusu avatar Nov 24 '14 14:11 parthbulusu