X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..530ef4b6c5b943cfa68b779d11cf7de29aa878bf:/docs/source/DDCore.html diff --git a/docs/source/DDCore.html b/docs/source/DDCore.html index 5038f15d..9086ca31 100644 --- a/docs/source/DDCore.html +++ b/docs/source/DDCore.html @@ -1,11 +1,18 @@ - - - The source code - - - - -
/*
+
+
+      
+  The source code
+    
+    
+
+
+    
/*!
+ * Ext JS Library 3.2.1
+ * Copyright(c) 2006-2010 Ext JS, Inc.
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+/*
  * These classes are derivatives of the similarly named classes in the YUI Library.
  * The original license:
  * Copyright (c) 2006, Yahoo! Inc. All rights reserved.
@@ -97,7 +104,7 @@ Ext.dd.DragDrop.prototype = {
 
     /**
      * The id of the element that will be dragged.  By default this is same
-     * as the linked element , but could be changed to another element. Ex:
+     * as the linked element, but could be changed to another element. Ex:
      * Ext.dd.DDProxy
      * @property dragElId
      * @type String
@@ -188,7 +195,9 @@ Ext.dd.DragDrop.prototype = {
      * Lock this instance
      * @method lock
      */
-    lock: function() { this.locked = true; },
+    lock: function() {
+        this.locked = true;
+    },
 
     
/** * When set to true, other DD objects in cooperating DDGroups do not receive @@ -202,7 +211,9 @@ Ext.dd.DragDrop.prototype = { * Unlock this instace * @method unlock */ - unlock: function() { this.locked = false; }, + unlock: function() { + this.locked = false; + },
/** * By default, all instances can be a drop target. This can be disabled by @@ -270,7 +281,6 @@ Ext.dd.DragDrop.prototype = { * The up constraint * @property minY * @type int - * @type int * @private */ minY: 0, @@ -322,7 +332,7 @@ Ext.dd.DragDrop.prototype = { primaryButtonOnly: true,
/** - * The availabe property is false until the linked dom element is accessible. + * The available property is false until the linked dom element is accessible. * @property available * @type boolean */ @@ -520,24 +530,25 @@ Ext.dd.DragDrop.prototype = { * @param {Boolean} inContent (optional) Constrain the draggable in the content box of the element (inside padding and borders) */ constrainTo : function(constrainTo, pad, inContent){ - if(typeof pad == "number"){ + if(Ext.isNumber(pad)){ pad = {left: pad, right:pad, top:pad, bottom:pad}; } pad = pad || this.defaultPadding; - var b = Ext.get(this.getEl()).getBox(); - var ce = Ext.get(constrainTo); - var s = ce.getScroll(); - var c, cd = ce.dom; + var b = Ext.get(this.getEl()).getBox(), + ce = Ext.get(constrainTo), + s = ce.getScroll(), + c, + cd = ce.dom; if(cd == document.body){ c = { x: s.left, y: s.top, width: Ext.lib.Dom.getViewWidth(), height: Ext.lib.Dom.getViewHeight()}; }else{ var xy = ce.getXY(); - c = {x : xy[0]+s.left, y: xy[1]+s.top, width: cd.clientWidth, height: cd.clientHeight}; + c = {x : xy[0], y: xy[1], width: cd.clientWidth, height: cd.clientHeight}; } - var topSpace = b.y - c.y; - var leftSpace = b.x - c.x; + var topSpace = b.y - c.y, + leftSpace = b.x - c.x; this.resetConstraints(); this.setXConstraint(leftSpace - (pad.left||0), // left @@ -712,7 +723,6 @@ Ext.dd.DragDrop.prototype = { this.lastPageX = p[0]; this.lastPageY = p[1]; - this.setStartPosition(p); }, @@ -854,7 +864,6 @@ Ext.dd.DragDrop.prototype = { // set the initial element position this.setStartPosition(); - this.b4MouseDown(e); this.onMouseDown(e); @@ -1105,8 +1114,6 @@ Ext.dd.DragDrop.prototype = { * @param {boolean} maintainOffset */ resetConstraints: function() { - - // Maintain offsets if necessary if (this.initPageX || this.initPageX === 0) { // figure out how much this thing has moved @@ -1144,7 +1151,6 @@ Ext.dd.DragDrop.prototype = { * @private */ getTick: function(val, tickArray) { - if (!tickArray) { // If tick interval is not defined, it is effectively 1 pixel, // so we return the value passed to us. @@ -1181,7 +1187,7 @@ Ext.dd.DragDrop.prototype = { }; })(); -
/** +/* * The drag and drop utility provides a framework for building drag and drop * applications. In addition to enabling drag and drop for specific elements, * the drag and drop elements are tracked by the manager class, and the @@ -1212,7 +1218,7 @@ Ext.dd.DragDropMgr = function() { * dimension is the DragDrop item group, the second the DragDrop * object. * @property ids - * @type {string: string} + * @type String[] * @private * @static */ @@ -1223,7 +1229,7 @@ Ext.dd.DragDropMgr = function() { * if the element that generated the mousedown event is actually the * handle and not the html element itself. * @property handleIds - * @type {string: string} + * @type String[] * @private * @static */ @@ -1437,7 +1443,7 @@ Ext.dd.DragDropMgr = function() {
/** * The number of milliseconds after the mousedown event to initiate the - * drag if we don't get a mouseup event. Default=1000 + * drag if we don't get a mouseup event. Default=350 * @property clickTimeThresh * @type int * @static @@ -1593,8 +1599,8 @@ Ext.dd.DragDropMgr = function() { * Returns true if the specified dd target is a legal target for * the specifice drag obj * @method isLegalTarget - * @param {DragDrop} the drag obj - * @param {DragDrop} the target + * @param {DragDrop} oDD the drag obj + * @param {DragDrop} oTargetDD the target * @return {boolean} true if the target is a legal target for the * dd obj * @static @@ -2266,32 +2272,32 @@ Ext.dd.DragDropMgr = function() { return (el) ? el.style : null; }, -
/** +
/** * Inner class for cached elements - * @class DragDropMgr.ElementWrapper + * @class Ext.dd.DragDropMgr.ElementWrapper * @for DragDropMgr * @private * @deprecated */ ElementWrapper: function(el) { -
/** +
/** * The element * @property el */ this.el = el || null; -
/** +
/** * The element id * @property id */ this.id = this.el && el.id; -
/** +
/** * A reference to the style property * @property css */ this.css = this.el && el.style; }, -
/** +
/** * Returns the X position of an html element * @method getPosX * @param el the element for which to get the position @@ -2304,7 +2310,7 @@ Ext.dd.DragDropMgr = function() { return Ext.lib.Dom.getX(el); }, -
/** +
/** * Returns the Y position of an html element * @method getPosY * @param el the element for which to get the position @@ -2316,7 +2322,7 @@ Ext.dd.DragDropMgr = function() { return Ext.lib.Dom.getY(el); }, -
/** +
/** * Swap two nodes. In IE, we use the native method, for others we * emulate the IE behavior * @method swapNode @@ -2362,7 +2368,7 @@ Ext.dd.DragDropMgr = function() { return { top: t, left: l }; }, -
/** +
/** * Returns the specified element style property * @method getStyle * @param {HTMLElement} el the element @@ -2375,23 +2381,27 @@ Ext.dd.DragDropMgr = function() { return Ext.fly(el).getStyle(styleProp); }, -
/** +
/** * Gets the scrollTop * @method getScrollTop * @return {int} the document's scrollTop * @static */ - getScrollTop: function () { return this.getScroll().top; }, + getScrollTop: function () { + return this.getScroll().top; + }, -
/** +
/** * Gets the scrollLeft * @method getScrollLeft * @return {int} the document's scrollTop * @static */ - getScrollLeft: function () { return this.getScroll().left; }, + getScrollLeft: function () { + return this.getScroll().left; + }, -
/** +
/** * Sets the x/y position of an element to the location of the * target element. * @method moveToEl @@ -2404,12 +2414,14 @@ Ext.dd.DragDropMgr = function() { Ext.lib.Dom.setXY(moveEl, aCoord); }, -
/** +
/** * Numeric array sort function * @method numericSort * @static */ - numericSort: function(a, b) { return (a - b); }, + numericSort: function(a, b) { + return (a - b); + }, /** * Internal counter @@ -2441,7 +2453,7 @@ Ext.dd.DragDropMgr = function() { } }, -
/** +
/** * Recursively searches the immediate parent and all child nodes for * the handle element in order to determine wheter or not it was * clicked. @@ -2684,8 +2696,6 @@ Ext.extend(Ext.dd.DD, Ext.dd.DragDrop, { * @private */ getTargetCoord: function(iPageX, iPageY) { - - var x = iPageX - this.deltaX; var y = iPageY - this.deltaY; @@ -2987,10 +2997,172 @@ Ext.dd.DDTarget = function(id, sGroup, config) { // Ext.dd.DDTarget.prototype = new Ext.dd.DragDrop(); Ext.extend(Ext.dd.DDTarget, Ext.dd.DragDrop, { +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + getDragEl: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + isValidHandleChild: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + startDrag: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + endDrag: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + onDrag: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + onDragDrop: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + onDragEnter: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + onDragOut: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + onDragOver: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + onInvalidDrop: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + onMouseDown: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + onMouseUp: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + setXConstraint: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + setYConstraint: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + resetConstraints: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + clearConstraints: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + clearTicks: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + setInitPosition: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + setDragElId: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + setHandleElId: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + setOuterHandleElId: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + addInvalidHandleClass: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + addInvalidHandleId: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + addInvalidHandleType: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + removeInvalidHandleClass: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + removeInvalidHandleId: Ext.emptyFn, +
/** + * @hide + * Overridden and disabled. A DDTarget does not support being dragged. + * @method + */ + removeInvalidHandleType: Ext.emptyFn, + toString: function() { return ("DDTarget " + this.id); } -}); -
- +});
+ \ No newline at end of file