diff --git a/invokeai/frontend/web/src/features/regionalPrompts/util/renderers.ts b/invokeai/frontend/web/src/features/regionalPrompts/util/renderers.ts index a7d222f664..0ed0dd09f3 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/util/renderers.ts +++ b/invokeai/frontend/web/src/features/regionalPrompts/util/renderers.ts @@ -62,6 +62,9 @@ export const renderBrushPreview = ( layer = new Konva.Layer({ id: BRUSH_PREVIEW_LAYER_ID, visible: tool !== 'move', listening: false }); stage.add(layer); // The brush preview is hidden and shown as the mouse leaves and enters the stage + stage.on('mousemove', (e) => { + e.target.getStage()?.findOne(`#${BRUSH_PREVIEW_LAYER_ID}`)?.visible(true); + }); stage.on('mouseleave', (e) => { e.target.getStage()?.findOne(`#${BRUSH_PREVIEW_LAYER_ID}`)?.visible(false); });