Opened 11 years ago
Closed 11 years ago
#8048 closed bug (notabug)
Problems with steps
Reported by: | yop289 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.slider | Version: | 1.8.16 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description (last modified by )
Hi, I think that is a minor bug in ui.slider with step option:
I set to step: 12
- If you begin to move slider from 500 the first step should be 488, and ui slider set it to 492.
- If you move again the slider to top it set to 504, a not to 500.
- if you move the slider to 0 it should stop on 12, but it goes to 0.
thanks a lot for your great work
Change History (1)
comment:1 Changed 11 years ago by
Description: | modified (diff) |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
The step counts up from the min (0) not down from the max (500), 492 is evenly divisible by 12, 488 is not
The slider hasn't actually moved to the value 504, you have been given a notice in the slide event by way of the ui.values argument that the user requested the value be set to 504. After the event, the max constraint is enforced, and if you check .slider("values") you'll see the top value never does exceed the max
I'm not sure why you feel the slider shouldn't go to 0 as you've set the min to 0. If you want 12 to be the lowest possible value, set the min to 12
All the behaviors as per your description and the attached fiddle are as designed.