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

Dragging a DDProxy element out of its slot

Expand Messages
  • Tom W
    Hi, I have some drag and drop DDProxy objects and each stored in one of three slots. If I drag an element from one slot to another, the elements are swapped.
    Message 1 of 2 , Sep 4, 2006
    • 0 Attachment
      Hi,
      I have some drag and drop DDProxy objects and each stored in one of
      three slots. If I drag an element from one slot to another, the
      elements are swapped. What I would like to do is delete an element
      from a slot if it is dragged somewhere on screen that is not a slot.

      The problem is onMouseUp does not let me know whether or not my
      object was dropped on another element (or the current element).

      Basically I would like my onMouseUp to only do something if
      onDragDrop is not triggered. Is this possible?

      Thanks,
      Tom
    • Adam Moore
      ... Currently drag and drop does not support this directly. The workaround is to set a variable in startDrag, clear it in onDragDrop, and check it in the
      Message 2 of 2 , Sep 5, 2006
      • 0 Attachment
        On Mon, Sep 04, 2006 at 09:33:26PM -0000, Tom W wrote:
        > Hi,
        > I have some drag and drop DDProxy objects and each stored in one of
        > three slots. If I drag an element from one slot to another, the
        > elements are swapped. What I would like to do is delete an element
        > from a slot if it is dragged somewhere on screen that is not a slot.
        >
        > The problem is onMouseUp does not let me know whether or not my
        > object was dropped on another element (or the current element).
        >
        > Basically I would like my onMouseUp to only do something if
        > onDragDrop is not triggered. Is this possible?

        Currently drag and drop does not support this directly. The workaround is
        to set a variable in startDrag, clear it in onDragDrop, and check it in the
        endDrag event. If the value has not been cleared, it was not dropped on a
        targetable item.


        -Adam
      Your message has been successfully submitted and would be delivered to recipients shortly.