mirror of
https://github.com/Azornes/Comfyui-LayerForge.git
synced 2026-03-21 20:52:12 -03:00
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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user