Search the web
Sign In
New User? Sign Up
ydn-javascript · Yahoo! User Interface Library Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Slider newbie question   Message List  
Reply | Forward Message #30905 of 52115 |
Re: Slider newbie question

--- 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




Tue May 13, 2008 9:55 pm

y_lsmith
Online Now Online Now
Send Email Send Email

Forward
Message #30905 of 52115 |
Expand Messages Author Sort by Date

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...
deejaynokturnal
Offline Send Email
May 13, 2008
9:14 pm

... src="/Slider/Images/Arrow_facing_up.png" ... YAHOO.widget.Slider.getVertDualSlider("demo_bg","demo_min_thumb","demo_m\ ... probing ... Not a newbie...
y_lsmith
Online Now Send Email
May 13, 2008
9:55 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help