Skip to main content

Search and Top Navigation

#4388 open feature ()

Opened March 22, 2009 01:36AM UTC

Last modified June 24, 2014 11:54PM UTC

slider range option should work with more than two handles

Reported by: vitch Owned by:
Priority: major Milestone: none
Component: ui.slider Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

Currently the range option in ui.slider doesn't work where there are more than two handles (in fact, it resets the values passed in so they both equal values[0]).

For my current use case the user should be able to select a range including a mid value (they are selecting a "typical", "min" and "max" size).

I propose that you should be able to have a range slider with more than two handles. In the simplist case it can be assumed that the first handle is the bottom of the range and the last handle is the top of the range. This will cover my use-case. I can also see a possible requirement for more complex ranges where the user could specify which handles represented ranges.

Attachments (1)
Change History (11)

Changed March 22, 2009 03:27AM UTC by vitch comment:1

The attached patch seems to work for me. It may need more careful testing to check it works in all circumstances though. I was unable to figure out how the animate parameter was meant to work so I couldn't test that the logic worked there but I shouldn't have disturbed anything.

There was also some unused variables (vp0 and vp1) which I removed and I simplifed a little of the code by calcualing some local variables outside a loop.

Changed March 22, 2009 04:58AM UTC by vitch comment:2

Changed March 22, 2009 12:59PM UTC by rdworth comment:3

type: bugfeature

Changed May 07, 2009 12:49PM UTC by jzaefferer comment:4

milestone: TBD1.8

Patch needs testing.

Changed August 23, 2009 04:05PM UTC by jzaefferer comment:5

Duplicate of #4387?

Changed March 04, 2011 05:41PM UTC by NickHeiner comment:6

I implemented my own version of this before realizing that it had already been done here. It lets the user specify values for as many sliders as he wants, and set a CSS class for each range. Is it worth it to fork and send a pull request, or will the project probably go with the code that's already posted here?

Changed March 04, 2011 05:46PM UTC by scottgonzalez comment:7

Likely neither; slider is undergoing an API redesign in which it will likely be split into multiple widgets.

Changed September 07, 2011 08:05PM UTC by scottgonzalez comment:8

#7703 is a duplicate of this ticket.

Changed October 11, 2012 02:53PM UTC by scottgonzalez comment:9


Changed October 15, 2012 08:03PM UTC by tj.vantoll comment:10

status: newopen

Changed June 24, 2014 11:54PM UTC by scottgonzalez comment:11

milestone: 1.11.0none