Skip to main content

Search and Top Navigation

#2502 closed feature (fixed)

Opened March 13, 2008 03:21PM UTC

Closed March 17, 2008 06:04PM UTC

Last modified February 26, 2009 11:04AM UTC

ui.slider - Define ranges (min/max) for each handle

Reported by: joern Owned by: joern
Priority: major Milestone: 1.5
Component: ui.core 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 }
  ]
});
Attachments (0)
Change History (4)

Changed March 14, 2008 02:27PM UTC by paul comment:1

owner: paulbraeker

Changed March 17, 2008 05:34PM UTC by joern comment:2

owner: braekerjoern

Changed March 17, 2008 06:04PM UTC by joern comment:3

resolution: → fixed
status: newclosed

Implemented in [5064].

Changed February 26, 2009 11:04AM UTC by paul comment:4

milestone: → 1.5