Add onInteractionEnd callback to Canvas

Introduces an optional onInteractionEnd callback to the Canvas class, which is triggered at the end of user interactions. CanvasView now uses this callback to update output after interactions, improving responsiveness to user actions.
This commit is contained in:
Dariusz L
2025-06-28 01:35:18 +02:00
parent d8ebbeea1e
commit f76f047fa6
3 changed files with 8 additions and 2 deletions

View File

@@ -11,7 +11,9 @@ import {createModuleLogger} from "./utils/LoggerUtils.js";
const log = createModuleLogger('Canvas_view');
async function createCanvasWidget(node, widget, app) {
const canvas = new Canvas(node, widget);
const canvas = new Canvas(node, widget, {
onInteractionEnd: () => updateOutput()
});
const imageCache = new ImageCache();
const style = document.createElement('style');