Bug Tracker

Modify

Ticket #1938 (closed enhancement: fixed)

Opened 6 years ago

Last modified 6 years ago

[PATCH] sliderMoveTo for multiple handles

Reported by: nostrademons Owned by: paul
Priority: major Milestone: 1.2.2
Component: ui Version: 1.2.1
Keywords: slider Cc:
Blocking: Blocked by:

Description

There're several folks asking for multiple-handle sliderMoveTo on the UI list:

 http://groups.google.com/group/jquery-ui/browse_thread/thread/20db89aaad9836f0#

Kalath e-mailed me off-list and asked about it, and I wrote up a quick patch. It adds an extra parameter to sliderMoveTo which is the (zero-based) index of the handle to move, so to move the 3rd handle to 40 you'd do:

$('#slider').sliderMoveTo(40, null, null, null, 2);

The patch moves most of the body of moveTo() into an inner function that takes the interaction handle, and then calls that function with either this.interaction (single handle) or this.interactions[which] (multiple handles). All the rest of the touched lines are indentation changes or this->self swaps to make the moveTo body work inside an inner function.

It's dependent upon bug #1737. The patches themselves are independent (and both should be applied), but sliderMoveTo doesn't work at all until #1737 is fixed.

Attachments

bug1938.patch Download (2.8 KB) - added by nostrademons 6 years ago.
Adds 'which' parameter to sliderMoveTo for multiple handles

Change History

Changed 6 years ago by nostrademons

Adds 'which' parameter to sliderMoveTo for multiple handles

comment:1 Changed 6 years ago by paul

  • Owner set to paul
  • Status changed from new to assigned

comment:2 Changed 6 years ago by paul

  • Status changed from assigned to closed
  • Resolution set to fixed

implemented in 1.5b.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.