Ticket #2502 (closed feature: fixed)
ui.slider - Define ranges (min/max) for each handle
| Reported by: | joern | Owned by: | joern |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | ui | Version: | |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
I need to define ranges for each handle, eg. handle one must be between 2 and 10, handle two between 5 and 100, where one must always be smaller then two. In other words: 2 < x <= 10, 5 < y <= 100, x < y.
Currently there is no way to restrict each handle.
Implementation notes:
There are several places where the restricition must be checked. Both the keydown and the click handler delegate to moveTo. So moveTo and drag, which handles the mouseinteraction, should check the range.
Specifying values could be done in the same fashion as for startValues (see #2053), eg.
$(...).slider({
minValue: [2, 10],
maxValue: [5, 100]
});
An alternative, grouping by handle:
$(...).slider({
boundaries: [
{ min: 2, start: 5, max: 10 },
{ min: 10, start: 40, max: 100 }
]
});
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
