@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
1 lines • 1.24 kB
JavaScript
module.exports=function(e){var o={};function r(n){if(o[n])return o[n].exports;var t=o[n]={exports:{},id:n,loaded:!1};return e[n].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}return r.m=e,r.c=o,r.p="",r(0)}({0:function(n,t,e){n.exports=e(1753)},3:function(n,t){n.exports=function(){throw Error("define cannot be used indirect")}},20:function(n,t){n.exports=require("../kendo.core")},1753:function(n,t,e){var o;e(3),e=[e(20)],void 0===(t="function"==typeof(o=function(){var t=kendo,n=t.Observable.extend({init:function(n){t.Observable.fn.init.call(this,n);this.clear()},events:["undo","redo"],push:function(n){this.stack=this.stack.slice(0,this.currentCommandIndex+1);this.currentCommandIndex=this.stack.push(n)-1},undo:function(){if(this.canUndo()){var n=this.stack[this.currentCommandIndex--];n.undo();this.trigger("undo",{command:n})}},redo:function(){if(this.canRedo()){var n=this.stack[++this.currentCommandIndex];n.redo();this.trigger("redo",{command:n})}},clear:function(){this.stack=[];this.currentCommandIndex=-1},canUndo:function(){return this.currentCommandIndex>=0},canRedo:function(){return this.currentCommandIndex!=this.stack.length-1}});t.deepExtend(t,{util:{UndoRedoStack:n}})})?o.apply(t,e):o)||(n.exports=t)}});