mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): do no create extraneous pos
var
This commit is contained in:
parent
f6664960ca
commit
1b8651fa26
@ -158,11 +158,10 @@ export const Flow = () => {
|
|||||||
|
|
||||||
const onMouseMove = useCallback((event: MouseEvent<HTMLDivElement>) => {
|
const onMouseMove = useCallback((event: MouseEvent<HTMLDivElement>) => {
|
||||||
if (flowWrapper.current?.getBoundingClientRect()) {
|
if (flowWrapper.current?.getBoundingClientRect()) {
|
||||||
const pos = $flow.get()?.screenToFlowPosition({
|
cursorPosition.current = $flow.get()?.screenToFlowPosition({
|
||||||
x: event.clientX,
|
x: event.clientX,
|
||||||
y: event.clientY,
|
y: event.clientY,
|
||||||
});
|
});
|
||||||
cursorPosition.current = pos;
|
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user