A customized implementation of a DragZone which provides default implementations of two of the template methods of DragZone to enable dragging of the selected rows of a GridPanel.
A cooperating DropZone must be created who's template method implementations of onNodeEnter, onNodeOver, onNodeOut and onNodeDrop
are able to process the data which is provided.{
foo: true
}
{
A: "A"
}
var dd = new Ext.dd.DDProxy("dragDiv1", "proxytest",
{ dragElId: "existingProxyDiv" });
dd.startDrag = function(){
this.constrainTo("parent-id");
};
Or you can initalize it using the Ext.core.Element object:
Ext.get("dragDiv1").initDDProxy("proxytest", {dragElId: "existingProxyDiv"}, {
startDrag : function(){
this.constrainTo("parent-id");
}
});
The provided implementation of the getDragData method which collects the data to be dragged from the GridPanel on mousedown.
This data is available for processing in the onNodeEnter, onNodeOver, onNodeOut and onNodeDrop methods of a cooperating DropZone.
The data object contains the following properties:
An empty implementation. Implement this to provide coordinates for the drag proxy to slide back to after an invalid drop.
Called before a repair of an invalid drop to get the XY to animate to.
The provided implementation of the onInitDrag method. Sets the innerHTML of the drag proxy which provides the "picture" of the data being dragged.
The innerHTML data is found by calling the owning GridPanel's getDragDropText.