diff options
| author | Barak Korren <barak.korren@gmail.com> | 2013-04-02 20:38:07 +0300 |
|---|---|---|
| committer | Barak Korren <barak.korren@gmail.com> | 2013-04-02 20:38:07 +0300 |
| commit | 58a2577d48790c79adfd44bcfd662c980ce6cfe4 (patch) | |
| tree | 523d814ea0b7b6f617fe515b186099c6e83fed72 /lib/dojo/dnd/TimedMoveable.js.uncompressed.js | |
| parent | e470a273cf09562fb2f9c0c899002303f19c8d16 (diff) | |
| parent | cc332603431102a682feda22b9cf0093a29f0176 (diff) | |
Merge branch 'master' of https://github.com/gothfox/Tiny-Tiny-RSS.git
Diffstat (limited to 'lib/dojo/dnd/TimedMoveable.js.uncompressed.js')
| -rw-r--r-- | lib/dojo/dnd/TimedMoveable.js.uncompressed.js | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/lib/dojo/dnd/TimedMoveable.js.uncompressed.js b/lib/dojo/dnd/TimedMoveable.js.uncompressed.js deleted file mode 100644 index c496296fc..000000000 --- a/lib/dojo/dnd/TimedMoveable.js.uncompressed.js +++ /dev/null @@ -1,64 +0,0 @@ -define("dojo/dnd/TimedMoveable", ["../_base/declare", "./Moveable" /*=====, "./Mover" =====*/], function(declare, Moveable /*=====, Mover =====*/){ - // module: - // dojo/dnd/TimedMoveable - - /*===== - var __TimedMoveableArgs = declare([Moveable.__MoveableArgs], { - // timeout: Number - // delay move by this number of ms, - // accumulating position changes during the timeout - timeout: 0 - }); - =====*/ - - // precalculate long expressions - var oldOnMove = Moveable.prototype.onMove; - - return declare("dojo.dnd.TimedMoveable", Moveable, { - // summary: - // A specialized version of Moveable to support an FPS throttling. - // This class puts an upper restriction on FPS, which may reduce - // the CPU load. The additional parameter "timeout" regulates - // the delay before actually moving the moveable object. - - // object attributes (for markup) - timeout: 40, // in ms, 40ms corresponds to 25 fps - - constructor: function(node, params){ - // summary: - // an object that makes a node moveable with a timer - // node: Node||String - // a node (or node's id) to be moved - // params: __TimedMoveableArgs - // object with additional parameters. - - // sanitize parameters - if(!params){ params = {}; } - if(params.timeout && typeof params.timeout == "number" && params.timeout >= 0){ - this.timeout = params.timeout; - } - }, - - onMoveStop: function(/*Mover*/ mover){ - if(mover._timer){ - // stop timer - clearTimeout(mover._timer); - // reflect the last received position - oldOnMove.call(this, mover, mover._leftTop); - } - Moveable.prototype.onMoveStop.apply(this, arguments); - }, - onMove: function(/*Mover*/ mover, /*Object*/ leftTop){ - mover._leftTop = leftTop; - if(!mover._timer){ - var _t = this; // to avoid using dojo.hitch() - mover._timer = setTimeout(function(){ - // we don't have any pending requests - mover._timer = null; - // reflect the last received position - oldOnMove.call(_t, mover, mover._leftTop); - }, this.timeout); - } - } - }); -}); |