--- In ydn-javascript@yahoogroups.com, "deejaynokturnal" <ahyslop@...>
wrote:
>
>
> Sorry for asking a question that has probably already been asked 100
> times... but I could not find the answer in the search...
>
> I am attempting to use the getVertDualSlider and have successfully
> created the slider... kind of...
>
> The markup is as follows:
>
> <div style="padding:50px;">
> <div id="demo_bg" title="Range slider">
> <div id="demo_min_thumb"><img
> src="/Slider/Images/Arrow_facing_down.png" width="46" height="13"></div>
> <div id="demo_max_thumb"><img
src="/Slider/Images/Arrow_facing_up.png"
> width="46" height="13"></div>
> </div>
> </div>
>
> The JS is:
>
> <script type="text/javascript">
> (function ()
> {
> YAHOO.namespace('example');
>
> var Dom = YAHOO.util.Dom;
>
> var range = 200;
> var tickSize = 0;
> // Set up 12 pixel ticks
> //var tickSize = 20;
>
> YAHOO.util.Event.onDOMReady(function ()
> {
> // Create the DualSlider
> var slider =
>
YAHOO.widget.Slider.getVertDualSlider("demo_bg","demo_min_thumb","demo_m\
> ax_thumb",range, tickSize);
>
> slider.minRange = 0;
> slider.minSlider.animated = true;
> slider.maxSlider.animated = true;
>
> // Attach the slider to the YAHOO.example namespace for public
probing
> YAHOO.example.slider = slider;
> }
> );
> })();
> </script>
>
> I have added the minRange property to ensure that the sliders touch each
> other... the problem is they do not ever even come close to touching. I
> am sure it is the way that the distance is calculated as if I flip this
> to a horizontal dual slider they touch.
>
> What would be the solution to this problem to get the sliders to touch?
>
> Thanks and sorry for my newbie question :)
>
Not a newbie question at all. There just so happens to be a bug in
2.5.1 vertical DualSliders that mismanages the minRange for thumbs
that are wider than they are tall.
You can find a patch on this example page:
http://yuiblog.com/sandbox/yui/v251/examples/slider/dual_lock.html
Hope this helps,
Luke