Properties Methods Events Direct Link

Class Ext.dd.DragDrop

Package:Ext.dd
Defined In:DDCore.js
Class:DragDrop
Subclasses:DD, DDTarget
Extends:Object
Defines the interface and base operation of items that that can be dragged or can be drop targets. It was designed to be extended, overriding the event handlers for startDrag, onDrag, onDragOver and onDragOut. Up to three html elements can be associated with a DragDrop instance: This class should not be instantiated until the onload event to ensure that the associated elements are available. The following would define a DragDrop obj that would interact with any other DragDrop obj in the "group1" group:
dd = new Ext.dd.DragDrop("div1", "group1");
Since none of the event handlers have been implemented, nothing would actually happen if you were to run the code above. Normally you would override this class or one of the default implementations, but you can also override the methods you want on an instance of the class...
dd.onDragDrop = function(e, id) {
  alert("dd was dropped on " + id);
}

Public Properties

Property Defined By
  available : boolean
The availabe property is false until the linked dom element is accessible.
DragDrop
  config : object
Configuration attributes passed into the constructor
DragDrop
  defaultPadding : Object
Provides default constraint padding to "constrainTo" elements (defaults to {left: 0, right:0, top:0, bottom:0}).
DragDrop
  invalidHandleClasses : Array
An Array of CSS class names for elements to be considered in valid as drag handles.
DragDrop
  isTarget : boolean
By default, all instances can be a drop target. This can be disabled by setting isTarget to false.
DragDrop
  padding : int[]
The padding configured for this drag and drop object for calculating the drop zone intersection with this object.
DragDrop

Public Methods

Method Defined By

Public Events

This class has no public events.