Sha256: 4a2223b0a8499c7c92ef8871a137a4916cb0dd99325e04352ea65217c3bdccc8
Contents?: true
Size: 771 Bytes
Versions: 4
Compression:
Stored size: 771 Bytes
Contents
//>>built define("dojox/drawing/manager/Undo",["dojo","../util/oo"],function(_1,oo){ return oo.declare(function(_2){ this.keys=_2.keys; this.undostack=[]; this.redostack=[]; _1.connect(this.keys,"onKeyDown",this,"onKeyDown"); },{onKeyDown:function(_3){ if(!_3.cmmd&&!_3.ctrl){ return; } if(_3.keyCode==90&&!_3.shift){ this.undo(); }else{ if((_3.keyCode==90&&_3.shift)||_3.keyCode==89){ this.redo(); } } },add:function(_4){ _4.args=_1.mixin({},_4.args); this.undostack.push(_4); },apply:function(_5,_6,_7){ _1.hitch(_5,_6)(_7); },undo:function(){ var o=this.undostack.pop(); if(!o){ return; } o.before(); this.redostack.push(o); },redo:function(){ var o=this.redostack.pop(); if(!o){ return; } if(o.after){ o.after(); }else{ o.before(); } this.undostack.push(o); }}); });
Version data entries
4 entries across 4 versions & 1 rubygems