Update undo/redo button handlers in CanvasView

Changed the undo and redo button onclick handlers to call canvas.undo() and canvas.redo() instead of canvas.canvasState.undo() and canvas.canvasState.redo(). This aligns the button actions with the updated canvas API.
This commit is contained in:
Dariusz L
2025-07-02 10:08:32 +02:00
parent 2c313f43e8
commit d2ccfc4e20

View File

@@ -852,14 +852,14 @@ async function createCanvasWidget(node, widget, app) {
textContent: "Undo",
title: "Undo last action",
disabled: true,
onclick: () => canvas.canvasState.undo()
onclick: () => canvas.undo()
}),
$el("button.painter-button", {
id: `redo-button-${node.id}`,
textContent: "Redo",
title: "Redo last undone action",
disabled: true,
onclick: () => canvas.canvasState.redo()
onclick: () => canvas.redo()
}),
]),
$el("div.painter-separator"),