undo.js 281 B

123456789101112131415
  1. export var KEY = 'undo';
  2. export default function undoItem() {
  3. return {
  4. key: KEY,
  5. name: 'Undo',
  6. callback: function callback() {
  7. this.undo();
  8. },
  9. disabled: function disabled() {
  10. return this.undoRedo && !this.undoRedo.isUndoAvailable();
  11. }
  12. };
  13. }