View Full Version : Dragged Element offset in Advanced Custom Drag Drop

23 Nov 2007, 9:52 AM
I would first like to thank Jack Slocum and all the developers for this great resource - Ext is awesome.
Additional thanks to Jozef Sakalos for the great tutorials.

I have a (hopefully) minor question:
In the original drag drop tutorials, when you drag an item it starts out right over top of the original item. In the advanced drag drop tutorials, the dragged element starts off offset below and to the right of where the original element was. I would like to "fix" this behavior (or at least alter this feature).

In the getDragData method (of the example), I believe that target.getXY() will give the coordinates of the original element - I just can't figure out how to apply these coordinates to the dragged element so it starts out in the original position (I've tried overriding several methods - I just don't get which element I should be setting the position for: this.ddel? this.target?, or even whether the getDragData method is the correct method to be setting this elements position in.)

Any help is appreciated.