Side navigation
#2502 closed feature (fixed)
Opened March 13, 2008 03:21PM UTC
Closed March 17, 2008 06:04PM UTC
Last modified March 15, 2012 01:55AM UTC
ui.slider - Define ranges (min/max) for each handle
Reported by: | joern | Owned by: | joern |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | ui | Version: | |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
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 } ] });