Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

I have #40

wants to merge 1 commit into from

Conversation

parthbulusu
Copy link

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.

<div  range-slider show-values="true"  min="refinement.children[0].name" max="refinement.children[refinement.children.length-1].name" model-min="vm.selPubYearRange.min" model-max="vm.selPubYearRange.max" ></div>

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.
@danielcrisp
Copy link
Owner

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

Wouldn't parseFloat be better?

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

@parthbulusu
Copy link
Author

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
#40 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants