PDA

View Full Version : Drag and drop from outside Ext JS application



comic96
3 Sep 2012, 5:54 AM
Hi,

I'm trying to use an Ext JS DropTarget to allow me to drag a file from my desktop and drop it into an Ext JS Panel which is part of an Ext JS modal window.

The notifyDrop function of my DropTarget is not getting called.

Just wondered if anyone might have any thoughts as to what might be going wrong?

Many thanks

tvanzoelen
3 Sep 2012, 6:59 AM
If something is dragged within the ExtJs browser frame, the dragged object is wrapped with properties that the DropTarget can understand. Its a DragSource.

I havent done this myself, but then you should listen on the mouseEnter event of the window document and wrap that entering eventobject with the necessary properties. Create a DragSource on enter or something. That created DragSource you must provide with a ddGroup that corresponds with the target dGroup.

I wish you luck. And post your implementation :)

tvanzoelen
3 Sep 2012, 7:14 AM
Maybe the DragTracker picks it up.
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.dd.DragTracker