Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#2502 closed feature (fixed)

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 }
  ]
});

Change History (4)

comment:1 Changed 15 years ago by paul

Owner: changed from paul to braeker

comment:2 Changed 15 years ago by joern

Owner: changed from braeker to joern

comment:3 Changed 15 years ago by joern

Resolution: fixed
Status: newclosed

Implemented in [5064].

comment:4 Changed 14 years ago by paul

Milestone: 1.5
Note: See TracTickets for help on using tickets.