-<html>\r
-<head>\r
- <title>The source code</title>\r
- <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
- <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
-</head>\r
-<body onload="prettyPrint();">\r
- <pre class="prettyprint lang-js">/*
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>The source code</title>
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+</head>
+<body onload="prettyPrint();">
+ <pre class="prettyprint lang-js">/*!
+ * Ext JS Library 3.3.1
+ * Copyright(c) 2006-2010 Sencha Inc.
+ * licensing@sencha.com
+ * http://www.sencha.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.
/**
* 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
* Lock this instance
* @method lock
*/
- lock: function() { this.locked = true; },
+ lock: function() {
+ this.locked = true;
+ },
<div id="prop-Ext.dd.DragDrop-moveOnly"></div>/**
* When set to true, other DD objects in cooperating DDGroups do not receive
* Unlock this instace
* @method unlock
*/
- unlock: function() { this.locked = false; },
+ unlock: function() {
+ this.locked = false;
+ },
<div id="prop-Ext.dd.DragDrop-isTarget"></div>/**
* By default, all instances can be a drop target. This can be disabled by
* The up constraint
* @property minY
* @type int
- * @type int
* @private
*/
minY: 0,
primaryButtonOnly: true,
<div id="prop-Ext.dd.DragDrop-available"></div>/**
- * 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
*/
* @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
this.lastPageX = p[0];
this.lastPageY = p[1];
-
this.setStartPosition(p);
},
// set the initial element position
this.setStartPosition();
-
this.b4MouseDown(e);
this.onMouseDown(e);
* @param {boolean} maintainOffset
*/
resetConstraints: function() {
-
-
// Maintain offsets if necessary
if (this.initPageX || this.initPageX === 0) {
// figure out how much this thing has moved
* @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.
};
})();
-<div id="prop-Ext.dd.DragDrop-Only"></div>/**
+/*
* 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
* dimension is the DragDrop item group, the second the DragDrop
* object.
* @property ids
- * @type {string: string}
+ * @type String[]
* @private
* @static
*/
* 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
*/
<div id="prop-Ext.dd.DragDropMgr-clickTimeThresh"></div>/**
* 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
* 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
*/
handleMouseDown: function(e, oDD) {
if(Ext.QuickTips){
- Ext.QuickTips.disable();
+ Ext.QuickTips.ddDisable();
}
if(this.dragCurrent){
// the original browser mouseup wasn't handled (e.g. outside FF browser window)
handleMouseUp: function(e) {
if(Ext.QuickTips){
- Ext.QuickTips.enable();
+ Ext.QuickTips.ddEnable();
}
if (! this.dragCurrent) {
return;
return (el) ? el.style : null;
},
- <div id="cls-DragDropMgr.ElementWrapper"></div>/**
+ <div id="cls-Ext.dd.DragDropMgr.ElementWrapper"></div>/**
* Inner class for cached elements
- * @class DragDropMgr.ElementWrapper
+ * @class Ext.dd.DragDropMgr.ElementWrapper
* @for DragDropMgr
* @private
* @deprecated
*/
ElementWrapper: function(el) {
- <div id="prop-DragDropMgr.ElementWrapper-el"></div>/**
+ <div id="prop-Ext.dd.DragDropMgr.ElementWrapper-el"></div>/**
* The element
* @property el
*/
this.el = el || null;
- <div id="prop-DragDropMgr.ElementWrapper-id"></div>/**
+ <div id="prop-Ext.dd.DragDropMgr.ElementWrapper-id"></div>/**
* The element id
* @property id
*/
this.id = this.el && el.id;
- <div id="prop-DragDropMgr.ElementWrapper-css"></div>/**
+ <div id="prop-Ext.dd.DragDropMgr.ElementWrapper-css"></div>/**
* A reference to the style property
* @property css
*/
this.css = this.el && el.style;
},
- <div id="method-DragDropMgr.ElementWrapper-getPosX"></div>/**
+ <div id="method-Ext.dd.DragDropMgr.ElementWrapper-getPosX"></div>/**
* Returns the X position of an html element
* @method getPosX
* @param el the element for which to get the position
return Ext.lib.Dom.getX(el);
},
- <div id="method-DragDropMgr.ElementWrapper-getPosY"></div>/**
+ <div id="method-Ext.dd.DragDropMgr.ElementWrapper-getPosY"></div>/**
* Returns the Y position of an html element
* @method getPosY
* @param el the element for which to get the position
return Ext.lib.Dom.getY(el);
},
- <div id="method-DragDropMgr.ElementWrapper-swapNode"></div>/**
+ <div id="method-Ext.dd.DragDropMgr.ElementWrapper-swapNode"></div>/**
* Swap two nodes. In IE, we use the native method, for others we
* emulate the IE behavior
* @method swapNode
return { top: t, left: l };
},
- <div id="method-DragDropMgr.ElementWrapper-getStyle"></div>/**
+ <div id="method-Ext.dd.DragDropMgr.ElementWrapper-getStyle"></div>/**
* Returns the specified element style property
* @method getStyle
* @param {HTMLElement} el the element
return Ext.fly(el).getStyle(styleProp);
},
- <div id="method-DragDropMgr.ElementWrapper-getScrollTop"></div>/**
+ <div id="method-Ext.dd.DragDropMgr.ElementWrapper-getScrollTop"></div>/**
* Gets the scrollTop
* @method getScrollTop
* @return {int} the document's scrollTop
* @static
*/
- getScrollTop: function () { return this.getScroll().top; },
+ getScrollTop: function () {
+ return this.getScroll().top;
+ },
- <div id="method-DragDropMgr.ElementWrapper-getScrollLeft"></div>/**
+ <div id="method-Ext.dd.DragDropMgr.ElementWrapper-getScrollLeft"></div>/**
* Gets the scrollLeft
* @method getScrollLeft
* @return {int} the document's scrollTop
* @static
*/
- getScrollLeft: function () { return this.getScroll().left; },
+ getScrollLeft: function () {
+ return this.getScroll().left;
+ },
- <div id="method-DragDropMgr.ElementWrapper-moveToEl"></div>/**
+ <div id="method-Ext.dd.DragDropMgr.ElementWrapper-moveToEl"></div>/**
* Sets the x/y position of an element to the location of the
* target element.
* @method moveToEl
Ext.lib.Dom.setXY(moveEl, aCoord);
},
- <div id="method-DragDropMgr.ElementWrapper-numericSort"></div>/**
+ <div id="method-Ext.dd.DragDropMgr.ElementWrapper-numericSort"></div>/**
* Numeric array sort function
* @method numericSort
* @static
*/
- numericSort: function(a, b) { return (a - b); },
+ numericSort: function(a, b) {
+ return (a - b);
+ },
/**
* Internal counter
}
},
- <div id="method-DragDropMgr.ElementWrapper-handleWasClicked"></div>/**
+ <div id="method-Ext.dd.DragDropMgr.ElementWrapper-handleWasClicked"></div>/**
* Recursively searches the immediate parent and all child nodes for
* the handle element in order to determine wheter or not it was
* clicked.
* @private
*/
getTargetCoord: function(iPageX, iPageY) {
-
-
var x = iPageX - this.deltaX;
var y = iPageY - this.deltaY;
// Ext.dd.DDTarget.prototype = new Ext.dd.DragDrop();
Ext.extend(Ext.dd.DDTarget, Ext.dd.DragDrop, {
+ <div id="method-Ext.dd.DDTarget-getDragEl"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ getDragEl: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-isValidHandleChild"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ isValidHandleChild: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-startDrag"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ startDrag: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-endDrag"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ endDrag: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-onDrag"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ onDrag: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-onDragDrop"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ onDragDrop: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-onDragEnter"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ onDragEnter: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-onDragOut"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ onDragOut: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-onDragOver"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ onDragOver: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-onInvalidDrop"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ onInvalidDrop: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-onMouseDown"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ onMouseDown: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-onMouseUp"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ onMouseUp: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-setXConstraint"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ setXConstraint: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-setYConstraint"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ setYConstraint: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-resetConstraints"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ resetConstraints: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-clearConstraints"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ clearConstraints: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-clearTicks"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ clearTicks: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-setInitPosition"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ setInitPosition: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-setDragElId"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ setDragElId: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-setHandleElId"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ setHandleElId: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-setOuterHandleElId"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ setOuterHandleElId: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-addInvalidHandleClass"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ addInvalidHandleClass: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-addInvalidHandleId"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ addInvalidHandleId: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-addInvalidHandleType"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ addInvalidHandleType: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-removeInvalidHandleClass"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ removeInvalidHandleClass: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-removeInvalidHandleId"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ removeInvalidHandleId: Ext.emptyFn,
+ <div id="method-Ext.dd.DDTarget-removeInvalidHandleType"></div>/**
+ * @hide
+ * Overridden and disabled. A DDTarget does not support being dragged.
+ * @method
+ */
+ removeInvalidHandleType: Ext.emptyFn,
+
toString: function() {
return ("DDTarget " + this.id);
}
-});
-</pre> \r
-</body>\r
+});</pre>
+</body>
</html>
\ No newline at end of file