Skip to content

Commit aab152a

Browse files
psychedelicioushipsterusername
authored andcommitted
fix(ui): track mouse out flags correctly
1 parent c5b948b commit aab152a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

invokeai/frontend/web/src/features/controlLayers/hooks/mouseEventHooks.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,15 +188,15 @@ export const useMouseEvents = () => {
188188
return;
189189
}
190190
const pos = syncCursorPos(stage);
191+
$isDrawing.set(false);
192+
$lastCursorPos.set(null);
193+
$lastMouseDownPos.set(null);
191194
if (!pos || !selectedLayerId || selectedLayerType !== 'regional_guidance_layer') {
192195
return;
193196
}
194197
if (getIsFocused(stage) && getIsMouseDown(e) && (tool === 'brush' || tool === 'eraser')) {
195198
dispatch(rgLayerPointsAdded({ layerId: selectedLayerId, point: [pos.x, pos.y] }));
196199
}
197-
$isDrawing.set(false);
198-
$lastCursorPos.set(null);
199-
$lastMouseDownPos.set(null);
200200
},
201201
[selectedLayerId, selectedLayerType, tool, dispatch]
202202
);

0 commit comments

Comments
 (0)