Undo/Redo

ArtistAPhoto maintains a complete history of operations, allowing full undo/redo support.

// Undo last operation
editor.undo();

// Redo previously undone operation
editor.redo();

// Check availability
if (editor.canUndo()) {
  editor.undo();
}

if (editor.canRedo()) {
  editor.redo();
}

// Reset to original image
editor.reset();

// Get operation history
const history = editor.getHistory();