Clear Up
SharpKit Reference

DragSource Class

A simple class that provides the basic implementation needed to make any element draggable.

Namespace: Ext.dd

Constructors

Methods

Name Description
afterDragDrop(DragDrop, object, JsString) An empty function by default, but provided so that you can perform a custom action after a valid drag drop has occurred by providing an implementation.
afterDragEnter(DragDrop, object, JsString) An empty function by default, but provided so that you can perform a custom action when the dragged item enters the drop target by providing an implementation.
afterDragOut(DragDrop, object, JsString) An empty function by default, but provided so that you can perform a custom action after the dragged item is dragged out of the target without dropping.
afterDragOver(DragDrop, object, JsString) An empty function by default, but provided so that you can perform a custom action while the dragged item is over the drop target by providing an implementation.
afterInvalidDrop(object, JsString) An empty function by default, but provided so that you can perform a custom action after an invalid drop has occurred by providing an implementation.
afterValidDrop(object, object, JsString) An empty function by default, but provided so that you can perform a custom action after a valid drop has occurred by providing an implementation.
beforeDragDrop(DragDrop, object, JsString) An empty function by default, but provided so that you can perform a custom action before the dragged item is dropped onto the target and optionally cancel the onDragDrop.

This is a template method. a hook into the functionality of this class. Feel free to override it in child classes.

beforeDragEnter(DragDrop, object, JsString) An empty function by default, but provided so that you can perform a custom action before the dragged item enters the drop target and optionally cancel the onDragEnter.

This is a template method. a hook into the functionality of this class. Feel free to override it in child classes.

beforeDragOut(DragDrop, object, JsString) An empty function by default, but provided so that you can perform a custom action before the dragged item is dragged out of the target without dropping, and optionally cancel the onDragOut.

This is a template method. a hook into the functionality of this class. Feel free to override it in child classes.

beforeDragOver(DragDrop, object, JsString) An empty function by default, but provided so that you can perform a custom action while the dragged item is over the drop target and optionally cancel the onDragOver.

This is a template method. a hook into the functionality of this class. Feel free to override it in child classes.

beforeInvalidDrop(DragDrop, object, JsString) An empty function by default, but provided so that you can perform a custom action after an invalid drop has occurred.

This is a template method. a hook into the functionality of this class. Feel free to override it in child classes.

getDragData(object) Returns the data object associated with this drag source
getProxy() Returns the drag source's underlying Ext.dd.StatusProxy
hideProxy() Hides the drag source's Ext.dd.StatusProxy
onBeforeDrag(object, object) An empty function by default, but provided so that you can perform a custom action before the initial drag event begins and optionally cancel it.

This is a template method. a hook into the functionality of this class. Feel free to override it in child classes.

onStartDrag(JsNumber, JsNumber) An empty function by default, but provided so that you can perform a custom action once the initial drag event has begun. The drag cannot be canceled from this function.

This is a template method. a hook into the functionality of this class. Feel free to override it in child classes.

Fields

Name Description
animRepair If true, animates the proxy element back to the position of the handle element used to trigger the drag. Defaults to: true
ddGroup A named drag drop group to which this object belongs. If a group is specified, then this object will only interact with other drag drop objects in the same group.
dropAllowed The CSS class returned to the drag source when drop is allowed. Defaults to: "x-dd-drop-ok"
dropNotAllowed The CSS class returned to the drag source when drop is not allowed. Defaults to: "x-dd-drop-nodrop"
repairHighlightColor The color to use when visually highlighting the drag source in the afterRepair method after a failed drop (defaults to light blue). The color must be a 6 digit hex value, without a preceding '#'. Defaults to: "c3daf9"
© Copyright 2005-2011 SharpKit. All rights reserved.