-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
ensure newRng stays in bounds #4448
Conversation
Hi @jay-bis - are you attempting to fix the same bug as presented in #4417 (comment) here? |
Yes, I am! My first commit caused some of the tests to fail and was still a bit buggy; my newest commit passed all the tests and seems to work a bit more smoothly, and gets rid of the bug as far as I've tested it. |
Ok great - thanks! Your second commit looks good. Would you be interested in trying to write a few test cases to lock down your fix? If so, the new tests should be similar to plotly.js/test/jasmine/tests/range_slider_test.js Lines 152 to 202 in e778644
|
For sure! I'll get started on that. |
We somehow missed the updates on this PR. |
As of today, this is still an issue even in v2.27 |
Created a few checks to make sure the slider's range doesn't go out of its normal bounds. This is an attempt to fix the bug outlined by this gif.
I'm not sure what the preferred behavior would be when you do drag the slider to the max/min bounds, but what this solution does is snap the slider back to the graph's corresponding max/min x value when the slider is dragged past the max/min.