From 88c3a71586a5ae6c2b366f347e8900109740909b Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 10 Jul 2024 18:54:25 +1000 Subject: [PATCH] fix(ui): fix bug with usePanel --- invokeai/frontend/web/src/features/ui/hooks/usePanel.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invokeai/frontend/web/src/features/ui/hooks/usePanel.ts b/invokeai/frontend/web/src/features/ui/hooks/usePanel.ts index 69869dc2b3..6361130e81 100644 --- a/invokeai/frontend/web/src/features/ui/hooks/usePanel.ts +++ b/invokeai/frontend/web/src/features/ui/hooks/usePanel.ts @@ -203,14 +203,14 @@ export const usePanel = (arg: UsePanelOptions): UsePanelReturn => { const onDoubleClickHandle = useCallback(() => { // If the panel is really super close to the min size, collapse it - if (Math.abs((panelHandleRef.current?.getSize() ?? 0) - _minSize) < 0.01) { + if (Math.abs((panelHandleRef.current?.getSize() ?? 0) - _defaultSize) < 0.01) { collapse(); return; } // Otherwise, resize to the min size panelHandleRef.current?.resize(_defaultSize); - }, [_defaultSize, _minSize, collapse]); + }, [_defaultSize, collapse]); return { ref: panelHandleRef,