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

Animation and Drag Drop

Expand Messages
  • Marcus37TM
    I m trying to animate the dragged element to the linked element when the user lets go of the mouse button (this is using the list example btw). It animates
    Message 1 of 2 , Mar 3, 2006
    • 0 Attachment
      I'm trying to animate the dragged element to the linked element when
      the user lets go of the mouse button (this is using the list example
      btw). It animates nicely, but the dragged element doesn't seem to
      disappear after the animation. It will only disappear when another
      element is dragged. I tried looking into the problem, and I'm not
      certain, but I think it has something to do with the time it takes the
      animation to finish. The animation code is placed in the b4EndDrag
      section and it takes 0.5 seconds to completely. However, it seems
      like the EndDrag code is called immediately after the b4EndDrag code
      and does not wait the 0.5 seconds for the animation to finish, which
      results in an incomplete removal of the drag element. I'm not totally
      sure if this is the case, but I was wondering if anyone knows the
      solution to this. Thanks in advance.

      Mark
    • Marcus37TM
      I actually finally got it to work. I had to use the stop function of the animation, and then I placed the endDrag contents into this function, and finally
      Message 2 of 2 , Mar 3, 2006
      • 0 Attachment
        I actually finally got it to work. I had to use the 'stop' function
        of the animation, and then I placed the endDrag contents into this
        function, and finally commented out the old endDrag function in the
        dragdrop.js.

        --- In ydn-javascript@yahoogroups.com, "Marcus37TM" <marcus37tm@...>
        wrote:
        >
        > I'm trying to animate the dragged element to the linked element
        when
        > the user lets go of the mouse button (this is using the list
        example
        > btw). It animates nicely, but the dragged element doesn't seem to
        > disappear after the animation. It will only disappear when
        another
        > element is dragged. I tried looking into the problem, and I'm not
        > certain, but I think it has something to do with the time it takes
        the
        > animation to finish. The animation code is placed in the
        b4EndDrag
        > section and it takes 0.5 seconds to completely. However, it seems
        > like the EndDrag code is called immediately after the b4EndDrag
        code
        > and does not wait the 0.5 seconds for the animation to finish,
        which
        > results in an incomplete removal of the drag element. I'm not
        totally
        > sure if this is the case, but I was wondering if anyone knows the
        > solution to this. Thanks in advance.
        >
        > Mark
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.