ydn-js origin

YUI version 2.5.1

DualSlider background click aligns with inner thumb edge

Challenge

Create a DualSlider where clicking and dragging on the background aligns the thumb to the inner edge of the min/max thumbs.

Solution

Override the Slider method setThumbCenterPoint to support aligning the "center" to an edge of the thumb. Subscribe to the DualSlider's ready event to realign the thumbs to their respective inner edges.

Caveat: The values of the composite Sliders will still be reported as the offset from the center of the thumbs.