Trigger a drop event when a node is dropped ANYWHERE

Hi,

I have a situation where I need to perform an action during a drag and drop action. I can start the action using the OnBeforeDrag event but since the onDrop event is only triggered when an item is dropped on the tree target I cannot find a way to stop the action when the item is dropped ANYWHERE on the screen.

I have looked in the common dhtmlDragAndDropObject class but cannot see any obvious hooks.

Is there anyway to achieve this?

Thanks,
James

For anyone who also wants this.

Untill there is a more official way of doing this I have solved this by extending the “dhtmlXTreeObject” and overriding the “stopDrag” function, adding this following to the bottom:

if (typeof dragger.stopCallback == ‘function’)
dragger.stopCallback();

You can then set the callback on the tree like so

this.TREE.dragger.stopCallback = this.onDropAction.bind(this);