dd-proxy-debug.js revision 09ab44e129e6795eed34adfc06f7b741034e88a4
2beebed98b4fc7f018fb224a1e4a3ab6103a4c0bCraig McDonnell * The Drag & Drop Utility allows you to create a draggable interface efficiently, buffering you from browser-level abnormalities and enabling you to focus on the interesting logic surrounding your particular implementation. This component enables you to create a variety of standard draggable objects with just a few lines of code and then, using its extensive API, add your own specific implementation logic.
2beebed98b4fc7f018fb224a1e4a3ab6103a4c0bCraig McDonnell * @submodule dd-proxy
2beebed98b4fc7f018fb224a1e4a3ab6103a4c0bCraig McDonnell * This class extends dd-drag to allow for creating a proxy drag node, instead of dragging the original node.
2beebed98b4fc7f018fb224a1e4a3ab6103a4c0bCraig McDonnell * @class Proxy
2beebed98b4fc7f018fb224a1e4a3ab6103a4c0bCraig McDonnell * @extends Drag
2beebed98b4fc7f018fb224a1e4a3ab6103a4c0bCraig McDonnell * @constructor
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell var Proxy = function() {
91f0e3cb60de3eba8cbb70c7e36cc0df22d71f5bRobert Wapshott Proxy.superclass.constructor.apply(this, arguments);
2beebed98b4fc7f018fb224a1e4a3ab6103a4c0bCraig McDonnell * @attribute moveOnEnd
2beebed98b4fc7f018fb224a1e4a3ab6103a4c0bCraig McDonnell * @description Move the original node at the end of the drag. Default: true
2beebed98b4fc7f018fb224a1e4a3ab6103a4c0bCraig McDonnell * @type Boolean
2beebed98b4fc7f018fb224a1e4a3ab6103a4c0bCraig McDonnell * @attribute resizeFrame
2beebed98b4fc7f018fb224a1e4a3ab6103a4c0bCraig McDonnell * @description Make the Proxy node assume the size of the original node. Default: true
2beebed98b4fc7f018fb224a1e4a3ab6103a4c0bCraig McDonnell * @type Boolean
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * @attribute proxy
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * @description Make this Draggable instance a Proxy instance. Default: false
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * @type Boolean
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell set: function(v) {
2beebed98b4fc7f018fb224a1e4a3ab6103a4c0bCraig McDonnell * @attribute positionProxy
2beebed98b4fc7f018fb224a1e4a3ab6103a4c0bCraig McDonnell * @description Make the Proxy node appear in the same place as the original node. Default: true
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * @type Boolean
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * @attribute borderStyle
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * @description The default border style for the border of the proxy. Default: 1px solid #808080
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * @type Boolean
91f0e3cb60de3eba8cbb70c7e36cc0df22d71f5bRobert Wapshott * @method _setProxy
91f0e3cb60de3eba8cbb70c7e36cc0df22d71f5bRobert Wapshott * @description Handler for the proxy config attribute
91f0e3cb60de3eba8cbb70c7e36cc0df22d71f5bRobert Wapshott _setProxy: function(v) {
91f0e3cb60de3eba8cbb70c7e36cc0df22d71f5bRobert Wapshott if (this.get(DRAG_NODE).compareTo(this.get(NODE))) {
a3970d0ea62388e4ede01470a6436eb5c6c92353Craig McDonnell * @method _createFrame
a3970d0ea62388e4ede01470a6436eb5c6c92353Craig McDonnell * @description Create the proxy element if it doesn't already exist and set the DD.DDM._proxy value
* @description If resizeProxy is set to true (default) it will resize the proxy element to match the size of the Drag Element.
* If positionProxy is set to true (default) it will position the proxy element in the same location as the Drag Element.
_setFrame: function() {
initializer: function() {
this._createFrame();
start: function() {
this._setFrame();
* @description Ends the drag operation, if moveOnEnd is set it will position the Drag Element to the new location of the proxy.
end: function() {