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

TwoThumbSlider fails when step is not integer #641

Closed
GoogleCodeExporter opened this issue Jul 28, 2015 · 1 comment
Closed

TwoThumbSlider fails when step is not integer #641

GoogleCodeExporter opened this issue Jul 28, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link


What steps will reproduce the problem?
1. Create two thumb slider.
2. Set the step to 0.1
3. Set the extend to the maximum and start playing with the value thumb

What is the expected output? What do you see instead?
The sliders should always work. Instead there is a condition in 
setThumbPosition_ that says that:
- the sum of the value and extent from the range model should not exceed the 
maximum value
(this.getMaximum() >= end)

However due to the nature of numbers in JavaScript it is possible to get 
wrongly false value there due to rounding (so basically if we have maximum 
value 20 the end value could be calculated as 20.000000000000004).

From that point on the Value thumb does not work unless the extent thumb is 
moved to 'fix' the calculation.


What version of the product are you using? On what operating system?
latest from public git

Please provide any additional information below.

Note: we cannot accept patches without the contributor license agreement
being signed. See http://code.google.com/p/closure-
library/wiki/Contributors for more info.

Original issue reported on code.google.com by regardin...@gmail.com on 22 Apr 2014 at 12:18

@GoogleCodeExporter
Copy link
Author

This project has moved: https://github.com/google/closure-library

Original comment by johnl...@google.com on 23 Jul 2015 at 7:51

  • Changed state: Obsolete

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

No branches or pull requests

1 participant