UndoRedo.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. 'use strict';
  2. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3. /**
  4. * Licensed Materials - Property of IBM
  5. * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2019
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. define(['../../../../../lib/@waca/dashboard-common/dist/core/APIFactory', '../UndoRedoAPI'], function (APIFactory, UndoRedoAPI) {
  9. var UndoRedo = function () {
  10. function UndoRedo(undoRedoController) {
  11. _classCallCheck(this, UndoRedo);
  12. this.undoRedoController = undoRedoController;
  13. }
  14. UndoRedo.prototype.getAPI = function getAPI() {
  15. return APIFactory.createAPI(this, [UndoRedoAPI]);
  16. };
  17. UndoRedo.prototype.canUndo = function canUndo() {
  18. return this.undoRedoController.canUndo();
  19. };
  20. UndoRedo.prototype.canRedo = function canRedo() {
  21. return this.undoRedoController.canRedo();
  22. };
  23. UndoRedo.prototype.undo = function undo() {
  24. return this.undoRedoController.undo();
  25. };
  26. UndoRedo.prototype.redo = function redo() {
  27. return this.undoRedoController.redo();
  28. };
  29. UndoRedo.prototype.clearStack = function clearStack() {
  30. this.undoRedoController.clearStack();
  31. };
  32. return UndoRedo;
  33. }();
  34. return UndoRedo;
  35. });
  36. //# sourceMappingURL=UndoRedo.js.map