Fix range slider initial position, allow thumb positions to be equal #2182
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The range slider thumbs exhibited an arbitrary gap when they are moved next to each other. This gap should be zero so that the selected range is n..n (e.g. 10..10) when the thumbs are coincident. The arbitrary gap calculation imposed by the prior implementation results in different behavior based on step and range values.
This solution allows the range endpoints to be equal (no gap). The solution also ensures that the thumbs can always be accessed when thumb positions are the same (100% overlap). Fix initial position of minimum range thumb. The prior implementation was using the user defined range value as a "pixel", "x" value which resulted in the min track having the incorrect stop (filled in to the wrong x position).
There could be a new feature added to maintain a "gap" feature. This is out of scope for this PR.
Can ignore the import re-ordering - done by my lint rules.
Changelog
Eliminate the minimum gap between range slider thumbs (minimum gap is now 0).
Fix the initial position of the minimum range thumb.