I am trying to implement a slider that can have one or two handles
determined dynamically.  If there are two handles they have to have a
minimum range and if one handle gets close to the other handle, the
other handle should move away in order to keep the minimum range.  I
found the following problems:

1.  When I use $('#sliderId').data('slider').options.range = true/
false to dynamically set/unset the range if there are two or one
handle respectively, the range = true does get set in the options, but
ui.range = undefined.  Also, the transparent fade doesn't get
dynamically added in between the handles.  I don't really care about
this problem as much as I can calculate the range using $
('#sliderId').slider('value', $('#otherHandleId')) - $
('#sliderId').slider('value', $('#oneHandleId')) but it would be nice
to have the fade added/removed from in between the handles dynamically
without me having to .show()/.hide() it.

2.  I use the above method to compute the range between to handles (if
there are two) and if the range is less than the minimum range, I use $
('#sliderId').slider('moveTo', ui.value +/- minimum Range, $
('#otherHandleId'), true) to move the other slider farther away from
the current slider.  The problems is, the moveTo triggers the
otherHandld to become the ui.handle even though the mouse events do
not target the otherHandle.  This cause the two handles to just bounce
back and forth as one handle tries to move the other handle away, then
the other handle tries to move the one handle away and so on.

So, is there a way to use moveTo without firing the start, slide,
change callbacks, which seems to be the case?  Shouldn't the ui.handle
be tied to the mousedown/mousmove event, and not switch when moveTo is
called?

Any assistance would be greatly appreciated.

Reply via email to