-
-
Notifications
You must be signed in to change notification settings - Fork 333
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
fix(slider): correct computing of gapRatio #3100
Conversation
While the distance between two labels is too short for text at every label, we find out if we use only ticks with no text (gapRatio > 1) and apply text at any other tick (gapRatio = 2), any third tick (gapRatio = 3) and so on
🤔 Having your changes applied, the sliders end position value is almost never shown anymore, so people have no idea of the maximum possible value. See the very noticable difference here: Your changes: Current FUI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment above
The current code is buggy. You can see this if you use a prime number. (webm file) https://jsfiddle.net/inselhopper/uczsp3w6/14/ You wrote: "Also, the shown value totally differs on different sizes, now." → it seems like that, but not really. Current.FUI.-.JSFiddle.-.Code.Playground.1.webm |
I wrote this code 5 years ago, and barely touched it since... But here's my two cents: |
@Inselhopper I adopted your change into a new option value When |
Closing, as your change was basically implemented by #3111 as mentioned above |
While the distance between two labels is too short for text at every label, we find out if we use only ticks with no text (gapRatio > 1) and apply text at any other tick (gapRatio = 2), any third tick (gapRatio = 3) and so on