undo.js 343 B

12345678910111213141516171819
  1. 'use strict';
  2. exports.__esModule = true;
  3. exports.default = undoItem;
  4. var KEY = exports.KEY = 'undo';
  5. function undoItem() {
  6. return {
  7. key: KEY,
  8. name: 'Undo',
  9. callback: function callback() {
  10. this.undo();
  11. },
  12. disabled: function disabled() {
  13. return this.undoRedo && !this.undoRedo.isUndoAvailable();
  14. }
  15. };
  16. }