OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
themes
/
silver
/
main
/
ts
/
ui
/
dialog
/
imagetools
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 06:40:38 AM
rwxr-xr-x
📄
CropRect.ts
7.1 KB
02/20/2020 06:40:41 AM
rw-r--r--
📄
DragHelper.ts
3.43 KB
02/20/2020 06:40:41 AM
rw-r--r--
📄
EditPanel.ts
15.6 KB
02/20/2020 06:40:42 AM
rw-r--r--
📄
Errors.ts
2.39 KB
02/20/2020 06:40:42 AM
rw-r--r--
📄
ImagePanel.ts
6.88 KB
02/20/2020 06:40:43 AM
rw-r--r--
📄
ImageTools.ts
7.94 KB
02/20/2020 06:40:43 AM
rw-r--r--
📄
ImageToolsEvents.ts
1.17 KB
02/20/2020 06:40:44 AM
rw-r--r--
📄
SideBar.ts
2.62 KB
02/20/2020 06:40:44 AM
rw-r--r--
📄
UndoStack.ts
842 bytes
02/20/2020 06:40:45 AM
rw-r--r--
📄
Utils.ts
1.8 KB
02/20/2020 06:40:45 AM
rw-r--r--
📁
state
-
02/20/2020 06:42:44 AM
rwxr-xr-x
Editing: UndoStack.ts
Close
/** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ */ export default function () { const data = []; let index = -1; function add(state) { let removed; removed = data.splice(++index); data.push(state); return { state, removed }; } function undo() { if (canUndo()) { return data[--index]; } } function redo() { if (canRedo()) { return data[++index]; } } function canUndo() { return index > 0; } function canRedo() { return index !== -1 && index < data.length - 1; } return { data, add, undo, redo, canUndo, canRedo }; }