X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..f562e4c6e5fac7bcb445985b99acbea4d706e6f0:/docs/source/DragSource.html diff --git a/docs/source/DragSource.html b/docs/source/DragSource.html index 5bbc67df..5a5e6720 100644 --- a/docs/source/DragSource.html +++ b/docs/source/DragSource.html @@ -1,10 +1,24 @@ -
+ +/** - * @class Ext.dd.DragSource + + + + +\ No newline at end of file +The source code + + + + + + +/** + * @class Ext.dd.DragSource * @extends Ext.dd.DDProxy * A simple class that provides the basic implementation needed to make any element draggable. - * @constructor - * @param {Mixed} el The container element - * @param {Object} config */ Ext.define('Ext.dd.DragSource', { extend: 'Ext.dd.DDProxy', @@ -13,37 +27,43 @@ Ext.define('Ext.dd.DragSource', { 'Ext.dd.DragDropManager' ], - /** + /** * @cfg {String} 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 (defaults to undefined). + * interact with other drag drop objects in the same group. */ - /** - * @cfg {String} dropAllowed - * The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok"). + /** + * @cfg {String} [dropAllowed="x-dd-drop-ok"] + * The CSS class returned to the drag source when drop is allowed. */ - dropAllowed : Ext.baseCSSPrefix + 'dd-drop-ok', - /** - * @cfg {String} dropNotAllowed - * The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop"). + /** + * @cfg {String} [dropNotAllowed="x-dd-drop-nodrop"] + * The CSS class returned to the drag source when drop is not allowed. */ dropNotAllowed : Ext.baseCSSPrefix + 'dd-drop-nodrop', - /** + /** * @cfg {Boolean} animRepair - * Defaults to true. If true, animates the proxy element back to the position of the handle element used to trigger the drag. + * If true, animates the proxy element back to the position of the handle element used to trigger the drag. */ animRepair: true, - /** - * @cfg {String} repairHighlightColor The color to use when visually highlighting the drag source in the afterRepair - * method after a failed drop (defaults to 'c3daf9' - light blue). The color must be a 6 digit hex value, without + /** + * @cfg {String} 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 '#'. */ repairHighlightColor: 'c3daf9', + /** + * Creates new drag-source. + * @constructor + * @param {String/HTMLElement/Ext.Element} el The container element or ID of it. + * @param {Object} config (optional) Config object. + */ constructor: function(el, config) { this.el = Ext.get(el); if(!this.dragData){ @@ -63,7 +83,7 @@ Ext.define('Ext.dd.DragSource', { this.dragging = false; }, - /** + /** * Returns the data object associated with this drag source * @return {Object} data An object containing arbitrary data */ @@ -84,7 +104,7 @@ Ext.define('Ext.dd.DragSource', { } if (this.afterDragEnter) { - /** + /** * 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. * @param {Ext.dd.DragDrop} target The drop target @@ -97,7 +117,7 @@ Ext.define('Ext.dd.DragSource', { } }, - /** + /** * 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. * @param {Ext.dd.DragDrop} target The drop target @@ -125,7 +145,7 @@ Ext.define('Ext.dd.DragSource', { } if (this.afterDragOver) { - /** + /** * 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. * @param {Ext.dd.DragDrop} target The drop target @@ -138,7 +158,7 @@ Ext.define('Ext.dd.DragSource', { } }, - /** + /** * 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. * @param {Ext.dd.DragDrop} target The drop target @@ -159,7 +179,7 @@ Ext.define('Ext.dd.DragSource', { } this.proxy.reset(); if (this.afterDragOut) { - /** + /** * 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. * @param {Ext.dd.DragDrop} target The drop target @@ -173,7 +193,7 @@ Ext.define('Ext.dd.DragSource', { this.cachedTarget = null; }, - /** + /** * 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. * @param {Ext.dd.DragDrop} target The drop target @@ -200,7 +220,7 @@ Ext.define('Ext.dd.DragSource', { } if (this.afterDragDrop) { - /** + /** * 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. * @param {Ext.dd.DragDrop} target The drop target @@ -214,7 +234,7 @@ Ext.define('Ext.dd.DragSource', { delete this.cachedTarget; }, - /** + /** * 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. * @param {Ext.dd.DragDrop} target The drop target @@ -230,13 +250,13 @@ Ext.define('Ext.dd.DragSource', { onValidDrop: function(target, e, id){ this.hideProxy(); if(this.afterValidDrop){ - /** + /** * 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. * @param {Object} target The target DD * @param {Event} e The event object * @param {String} id The id of the dropped element - * @method afterInvalidDrop + * @method afterValidDrop */ this.afterValidDrop(target, e, id); } @@ -259,7 +279,7 @@ Ext.define('Ext.dd.DragSource', { this.proxy.repair(this.getRepairXY(e, this.dragData), this.afterRepair, this); if (this.afterInvalidDrop) { - /** + /** * 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. * @param {Event} e The event object @@ -279,7 +299,7 @@ Ext.define('Ext.dd.DragSource', { me.dragging = false; }, - /** + /** * An empty function by default, but provided so that you can perform a custom action after an invalid * drop has occurred. * @param {Ext.dd.DragDrop} target The drop target @@ -304,7 +324,7 @@ Ext.define('Ext.dd.DragSource', { } }, - /** + /** * 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. * @param {Object} data An object containing arbitrary data to be shared with drop targets @@ -315,11 +335,12 @@ Ext.define('Ext.dd.DragSource', { return true; }, - /** + /** * 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. * @param {Number} x The x position of the click on the dragged object * @param {Number} y The y position of the click on the dragged object + * @method */ onStartDrag: Ext.emptyFn, @@ -341,7 +362,7 @@ Ext.define('Ext.dd.DragSource', { return true; }, - /** + /** * Returns the drag source's underlying {@link Ext.dd.StatusProxy} * @return {Ext.dd.StatusProxy} proxy The StatusProxy */ @@ -349,7 +370,7 @@ Ext.define('Ext.dd.DragSource', { return this.proxy; }, - /** + /** * Hides the drag source's {@link Ext.dd.StatusProxy} */ hideProxy: function() { @@ -386,4 +407,6 @@ Ext.define('Ext.dd.DragSource', { Ext.destroy(this.proxy); } }); -