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

Re: [ydn-javascript] How to delay slider behaviour

Expand Messages
  • Adam Moore
    ... Michael, there is a property called moveComplete that is set to true when the animation is complete. Check this value in your onChange handler and only do
    Message 1 of 4 , Nov 1, 2006
    • 0 Attachment
      On Tue, Oct 31, 2006 at 07:51:23PM -0000, Michael Newton wrote:
      > I've got an onChange handler for some sliders that I don't want
      > triggered every time the slider moves. Is there a way to avoid the
      > event from firing until the slider has 'settled down'?
      >
      > For example, one of the sliders updates a database in real time. If
      > someone clicks the background to move the thumb (instead of dragging
      > it) there could be 5 or 10 writes to the database before the thumb
      > gets to its final position.
      >
      > Maybe someone has an idea that will solve the problem? Thank you.

      Michael, there is a property called moveComplete that is set to true when
      the animation is complete. Check this value in your onChange handler and
      only do your database update when it is true.

      -Adam
    • Michael Newton
      Thank you, shame this isn t documented! ... when ... handler and
      Message 2 of 4 , Nov 1, 2006
      • 0 Attachment
        Thank you, shame this isn't documented!

        --- In ydn-javascript@yahoogroups.com, Adam Moore <adamoore@...> wrote:
        >
        > On Tue, Oct 31, 2006 at 07:51:23PM -0000, Michael Newton wrote:
        > > I've got an onChange handler for some sliders that I don't want
        > > triggered every time the slider moves. Is there a way to avoid the
        > > event from firing until the slider has 'settled down'?
        > >
        > > For example, one of the sliders updates a database in real time. If
        > > someone clicks the background to move the thumb (instead of dragging
        > > it) there could be 5 or 10 writes to the database before the thumb
        > > gets to its final position.
        > >
        > > Maybe someone has an idea that will solve the problem? Thank you.
        >
        > Michael, there is a property called moveComplete that is set to true
        when
        > the animation is complete. Check this value in your onChange
        handler and
        > only do your database update when it is true.
        >
        > -Adam
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.