diff options
author | Andrew Dolgov <[email protected]> | 2012-08-14 19:04:32 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-08-14 19:04:32 +0400 |
commit | 0181c0110985cfd2659e81c8cc1ef5a2f73bc697 (patch) | |
tree | e2250a345481fa63cfcf98d76830338ad7eb9818 /lib/dojo/dnd/move.js.uncompressed.js | |
parent | 973c4a649fd8f83ed85004f3365f10f9c24d8349 (diff) |
dojo: remove uncompressed files
Diffstat (limited to 'lib/dojo/dnd/move.js.uncompressed.js')
-rw-r--r-- | lib/dojo/dnd/move.js.uncompressed.js | 143 |
1 files changed, 0 insertions, 143 deletions
diff --git a/lib/dojo/dnd/move.js.uncompressed.js b/lib/dojo/dnd/move.js.uncompressed.js deleted file mode 100644 index a03954c3e..000000000 --- a/lib/dojo/dnd/move.js.uncompressed.js +++ /dev/null @@ -1,143 +0,0 @@ -define("dojo/dnd/move", ["../main", "./Mover", "./Moveable"], function(dojo) { - // module: - // dojo/dnd/move - // summary: - // TODOC - - -/*===== -dojo.declare("dojo.dnd.move.__constrainedMoveableArgs", [dojo.dnd.__MoveableArgs], { - // constraints: Function - // Calculates a constraint box. - // It is called in a context of the moveable object. - constraints: function(){}, - - // within: Boolean - // restrict move within boundaries. - within: false -}); -=====*/ - -dojo.declare("dojo.dnd.move.constrainedMoveable", dojo.dnd.Moveable, { - // object attributes (for markup) - constraints: function(){}, - within: false, - - constructor: function(node, params){ - // summary: - // an object that makes a node moveable - // node: Node - // a node (or node's id) to be moved - // params: dojo.dnd.move.__constrainedMoveableArgs? - // an optional object with additional parameters; - // the rest is passed to the base class - if(!params){ params = {}; } - this.constraints = params.constraints; - this.within = params.within; - }, - onFirstMove: function(/* dojo.dnd.Mover */ mover){ - // summary: - // called during the very first move notification; - // can be used to initialize coordinates, can be overwritten. - var c = this.constraintBox = this.constraints.call(this, mover); - c.r = c.l + c.w; - c.b = c.t + c.h; - if(this.within){ - var mb = dojo._getMarginSize(mover.node); - c.r -= mb.w; - c.b -= mb.h; - } - }, - onMove: function(/* dojo.dnd.Mover */ mover, /* Object */ leftTop){ - // summary: - // called during every move notification; - // should actually move the node; can be overwritten. - var c = this.constraintBox, s = mover.node.style; - this.onMoving(mover, leftTop); - leftTop.l = leftTop.l < c.l ? c.l : c.r < leftTop.l ? c.r : leftTop.l; - leftTop.t = leftTop.t < c.t ? c.t : c.b < leftTop.t ? c.b : leftTop.t; - s.left = leftTop.l + "px"; - s.top = leftTop.t + "px"; - this.onMoved(mover, leftTop); - } -}); - -/*===== -dojo.declare("dojo.dnd.move.__boxConstrainedMoveableArgs", [dojo.dnd.move.__constrainedMoveableArgs], { - // box: Object - // a constraint box - box: {} -}); -=====*/ - -dojo.declare("dojo.dnd.move.boxConstrainedMoveable", dojo.dnd.move.constrainedMoveable, { - // box: - // object attributes (for markup) - box: {}, - - constructor: function(node, params){ - // summary: - // an object, which makes a node moveable - // node: Node - // a node (or node's id) to be moved - // params: dojo.dnd.move.__boxConstrainedMoveableArgs? - // an optional object with parameters - var box = params && params.box; - this.constraints = function(){ return box; }; - } -}); - -/*===== -dojo.declare("dojo.dnd.move.__parentConstrainedMoveableArgs", [dojo.dnd.move.__constrainedMoveableArgs], { - // area: String - // A parent's area to restrict the move. - // Can be "margin", "border", "padding", or "content". - area: "" -}); -=====*/ - -dojo.declare("dojo.dnd.move.parentConstrainedMoveable", dojo.dnd.move.constrainedMoveable, { - // area: - // object attributes (for markup) - area: "content", - - constructor: function(node, params){ - // summary: - // an object, which makes a node moveable - // node: Node - // a node (or node's id) to be moved - // params: dojo.dnd.move.__parentConstrainedMoveableArgs? - // an optional object with parameters - var area = params && params.area; - this.constraints = function(){ - var n = this.node.parentNode, - s = dojo.getComputedStyle(n), - mb = dojo._getMarginBox(n, s); - if(area == "margin"){ - return mb; // Object - } - var t = dojo._getMarginExtents(n, s); - mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h; - if(area == "border"){ - return mb; // Object - } - t = dojo._getBorderExtents(n, s); - mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h; - if(area == "padding"){ - return mb; // Object - } - t = dojo._getPadExtents(n, s); - mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h; - return mb; // Object - }; - } -}); - -// patching functions one level up for compatibility - -dojo.dnd.constrainedMover = dojo.dnd.move.constrainedMover; -dojo.dnd.boxConstrainedMover = dojo.dnd.move.boxConstrainedMover; -dojo.dnd.parentConstrainedMover = dojo.dnd.move.parentConstrainedMover; - -return dojo.dnd.move; -}); |