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

Impossible to balance beam with keyboard input #195

Closed
marlitas opened this issue Apr 2, 2024 · 1 comment
Closed

Impossible to balance beam with keyboard input #195

marlitas opened this issue Apr 2, 2024 · 1 comment
Assignees

Comments

@marlitas
Copy link
Contributor

marlitas commented Apr 2, 2024

In certain scenarios it is impossible to balance the beam if the mean value has a decimal. I console logged what the slider was setting the NumberProperty to and I noticed that it looks like it might be some kind of rounding error:

image

I'm not sure if this is a bug in AccessibleValueHandler or if this is something I should fix via brute force in the model... The latter feels icky...

I tried the following, but documentation indicates they will specifically not work with the shiftKeyboardStep, which is where we hit the problem.

  • roundToInterval: true
  • constrainValue
@marlitas
Copy link
Contributor Author

marlitas commented Apr 2, 2024

This was fixed above by using @jessegreenberg's suggestion of a11yMapValue. I also made sure to tie that change to phetsims/sun#837 so that it can be updated in the future if the API changes. Closing!

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

No branches or pull requests

1 participant