views:

238

answers:

1

OK I've got a little more research on this done so I'm going to totally rephrase the question:
I have two trees, I want to be able to drag items from one tree to the other. In the receiving tree I have some logic that allows or denys the drop. I am using the native cursor feedback Like this :

DragManager.showFeedback(DragManager.COPY);
DragManager.showFeedback(DragManager.NONE);

When the logic determines NONE it properly rejects the item except the drop position indicator sticks like in the screenshot.

I know now that neither dragComplete, nor dragDrop are being fired in this situation, so I have no function to put code into that would clean that up. So how can I listen for this drag rejection?

ScreenShot shows app After drop

alt text

Thanks ~Mike

PS with my other question: how-do-i-detect-that-drag-and-drop-operation-ended We have a way of getting an event to fire so we can clean up the tree control. I'm attaching an event listener to the stage so that as the mouse is moved (maybe I'll put it on a timer)it will constantly check if dragmanager.isdragging if it's not it will fire the tree.hideDropFeedBack. This still begs the question, what event is changing the isDragging Boolean and how do I listen for it?

A: 

You need to call tree.hideDropFeedback(); or event.target.hideDropFeedback(); to remove the drop indicators.

Thomas
tried it, doesn't work, or more accurately doesn't work when the drop is not being accepted. works allright when it is accepted.
invertedSpear
Next try: event.preventDefault() at the beginning of you treeDragOver() method.
Thomas
Tried that too, but tried it again. It's still no good, works exactly the same as not having the preventDefault()
invertedSpear
Found out that none of this works because dragComplete and dragDrop don't seem to get fired when DragManager.showFeedback(DragManager.NONE);
invertedSpear