PDA

View Full Version : Position of cursor in Custom Drag and Drop in EXTJS 3.4



bvishal
6 Mar 2014, 12:41 AM
Hi,

I am implemented custom drag and drop in my application with help of this link
http://dev.sencha.com/deploy/ext-3.4.0/examples/dd/dragdropzones.html

But I want my cursor pointer to be at same position from where I have dragged.

IF you notice it will always be at top left corner of dragged image.

Can anyone please help?

slemmon
13 Mar 2014, 11:28 AM
Hi,

You'll need to override the alignElWithMouse method to start.
http://docs.sencha.com/extjs/3.4.0/#!/api/Ext.dd.DragZone-method-alignElWithMouse

Though I suspect you'll need to also record in the beforedrag where the drag event started relative to the element being dragged so you can set your x/y offsets accordingly in your alignElWithMouse method.