mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): add debug button
This commit is contained in:
parent
fd616f247c
commit
ae3e473024
@ -27,6 +27,12 @@ export const ControlLayersToolbar = memo(() => {
|
|||||||
l.calculateBbox();
|
l.calculateBbox();
|
||||||
}
|
}
|
||||||
}, [canvasManager]);
|
}, [canvasManager]);
|
||||||
|
const debug = useCallback(() => {
|
||||||
|
if (!canvasManager) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
canvasManager.logDebugInfo();
|
||||||
|
}, [canvasManager]);
|
||||||
return (
|
return (
|
||||||
<Flex w="full" gap={2}>
|
<Flex w="full" gap={2}>
|
||||||
<Flex flex={1} justifyContent="center">
|
<Flex flex={1} justifyContent="center">
|
||||||
@ -40,6 +46,7 @@ export const ControlLayersToolbar = memo(() => {
|
|||||||
{tool === 'eraser' && <EraserWidth />}
|
{tool === 'eraser' && <EraserWidth />}
|
||||||
</Flex>
|
</Flex>
|
||||||
<Button onClick={bbox}>bbox</Button>
|
<Button onClick={bbox}>bbox</Button>
|
||||||
|
<Button onClick={debug}>debug</Button>
|
||||||
<Flex flex={1} justifyContent="center">
|
<Flex flex={1} justifyContent="center">
|
||||||
<Flex gap={2} marginInlineStart="auto" alignItems="center">
|
<Flex gap={2} marginInlineStart="auto" alignItems="center">
|
||||||
<FillColorPicker />
|
<FillColorPicker />
|
||||||
|
@ -547,4 +547,11 @@ export class CanvasManager {
|
|||||||
return getInitialImage({ ...arg, manager: this });
|
return getInitialImage({ ...arg, manager: this });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logDebugInfo() {
|
||||||
|
console.log(this);
|
||||||
|
for (const layer of this.layers.values()) {
|
||||||
|
console.log(layer);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user