Loading ...
Sorry, an error occurred while loading the content.

Re: Slider

Expand Messages
  • rodiniz2003
    ... Thank you for answering... for now I am using as a workaround a click event associated to the slider. This way I can be sure the slider was moved by an
    Message 1 of 4 , May 31, 2007
    • 0 Attachment
      --- In ydn-javascript@yahoogroups.com, "alexshusta"
      <alexander.shusta@...> wrote:
      >
      > I poked at it a bit, but, what you described appears to be intentional
      > behavior. If you'd like to modify YUI it shouldn't be too difficult.
      >
      > Currently, the setValue function makes a call to moveThumb which calls
      > endMove which finally calls fireEvents. fireEvents raises the actual
      > slideEnd event (see slider-debug.js line 980). For a quick and dirty
      > fix, you could comment out that line. But that would also break any
      > event handlers that are listening for slideEnd events (and leave your
      > slider state confused as the slideStart event is still being raised).
      >
      > A better solution would be to extend the current functions to either
      > pass a boolean argument along the chain that determines if the slideEnd
      > event is raised, or to set an instance var in the class that does the
      > same thing and then modify the fireEvents function to check that
      > variable before raising the slideEnd event (also modify any code that
      > raises the "slideStart" event to check that var before making any
      > noise).
      >
      > There's probably an elegant solution to this (most likely centered
      > around checking for side effects of a mouse click to determine whether
      > the slideStart, slideEnd events are raised), I just don't happen to know
      > it. :^P
      > ~Alexander
      >
      > --- In ydn-javascript@yahoogroups.com, "rodiniz2003" <rodiniz@>
      > wrote:
      > >
      > > --- In ydn-javascript@yahoogroups.com, "rodiniz2003" rodiniz@ wrote:
      > > >
      > > > I am using the yui slider and the setValue method is firing
      > > > the slideend event ... anyway I can prevent this?
      > > > I want the slideend event to be fired only when the user clicks the
      > > > slider..
      > > > thanks
      > > >
      > > no one?
      > >
      >
      Thank you for answering... for now I am using as a workaround
      a click event associated to the slider. This way I can be sure the
      slider was moved by an user action.
    Your message has been successfully submitted and would be delivered to recipients shortly.