@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
1 lines • 1.29 kB
JavaScript
module.exports=function(n){function t(o){if(e[o])return e[o].exports;var r=e[o]={exports:{},id:o,loaded:!1};return n[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var e={};return t.m=n,t.c=e,t.p="",t(0)}({0:function(n,t,e){e(1551),n.exports=e(1551)},3:function(n,t){n.exports=function(){throw Error("define cannot be used indirect")}},19:function(n,t){n.exports=require("../kendo.core")},1551:function(n,t,e){var o,r,i;!function(c,define){r=[e(19)],o=c,i="function"==typeof o?o.apply(t,r):o,!(void 0!==i&&(n.exports=i))}(function(){!function(n){var t=n.Observable.extend({init:function(t){n.Observable.fn.init.call(this,t),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}});n.deepExtend(n,{util:{UndoRedoStack:t}})}(kendo)},e(3))}});