From d2ccfc4e204a3a47f5c38c0d557a3e08d4cc6802 Mon Sep 17 00:00:00 2001 From: Dariusz L Date: Wed, 2 Jul 2025 10:08:32 +0200 Subject: [PATCH] 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. --- js/CanvasView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/CanvasView.js b/js/CanvasView.js index 3e718e6..ac1c080 100644 --- a/js/CanvasView.js +++ b/js/CanvasView.js @@ -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"),