From c171fe2b964468f9f4d4d738fd766f7cd0eddeab Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 6 Jun 2024 16:18:45 +1000 Subject: [PATCH] fix(ui): jank when starting a shape when not already focused on stage --- .../frontend/web/src/features/controlLayers/konva/events.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/invokeai/frontend/web/src/features/controlLayers/konva/events.ts b/invokeai/frontend/web/src/features/controlLayers/konva/events.ts index 1da8b6e8cf..1f66d208ce 100644 --- a/invokeai/frontend/web/src/features/controlLayers/konva/events.ts +++ b/invokeai/frontend/web/src/features/controlLayers/konva/events.ts @@ -1,6 +1,5 @@ import { calculateNewBrushSize } from 'features/canvas/hooks/useCanvasZoom'; import { - getIsFocused, getIsMouseDown, getScaledFlooredCursorPosition, snapPosToStage, @@ -205,7 +204,8 @@ export const setStageEventHandlers = ({ if (selectedLayer.type !== 'regional_guidance_layer' && selectedLayer.type !== 'raster_layer') { return; } - if (!getIsFocused(stage) || !getIsMouseDown(e)) { + + if (!getIsMouseDown(e)) { return; } @@ -257,7 +257,7 @@ export const setStageEventHandlers = ({ if (selectedLayer.type !== 'regional_guidance_layer' && selectedLayer.type !== 'raster_layer') { return; } - if (getIsFocused(stage) && getIsMouseDown(e)) { + if (getIsMouseDown(e)) { if (tool === 'brush') { onPointAddedToLine({ layerId: selectedLayer.id, point: [pos.x, pos.y] }); }