diff --git a/invokeai/frontend/web/src/features/controlLayers/components/ControlLayersToolbar.tsx b/invokeai/frontend/web/src/features/controlLayers/components/ControlLayersToolbar.tsx index 7ae7d61fcb..3818167eec 100644 --- a/invokeai/frontend/web/src/features/controlLayers/components/ControlLayersToolbar.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/ControlLayersToolbar.tsx @@ -27,6 +27,12 @@ export const ControlLayersToolbar = memo(() => { l.calculateBbox(); } }, [canvasManager]); + const debug = useCallback(() => { + if (!canvasManager) { + return; + } + canvasManager.logDebugInfo(); + }, [canvasManager]); return ( @@ -40,6 +46,7 @@ export const ControlLayersToolbar = memo(() => { {tool === 'eraser' && } + diff --git a/invokeai/frontend/web/src/features/controlLayers/konva/CanvasManager.ts b/invokeai/frontend/web/src/features/controlLayers/konva/CanvasManager.ts index 607a7e08a7..cb5954c619 100644 --- a/invokeai/frontend/web/src/features/controlLayers/konva/CanvasManager.ts +++ b/invokeai/frontend/web/src/features/controlLayers/konva/CanvasManager.ts @@ -547,4 +547,11 @@ export class CanvasManager { return getInitialImage({ ...arg, manager: this }); } } + + logDebugInfo() { + console.log(this); + for (const layer of this.layers.values()) { + console.log(layer); + } + } }