Skip to content

Commit 88c3a71

Browse files
psychedelicioushipsterusername
authored andcommitted
fix(ui): fix bug with usePanel
1 parent ec1b429 commit 88c3a71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

invokeai/frontend/web/src/features/ui/hooks/usePanel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,14 @@ export const usePanel = (arg: UsePanelOptions): UsePanelReturn => {
203203

204204
const onDoubleClickHandle = useCallback(() => {
205205
// If the panel is really super close to the min size, collapse it
206-
if (Math.abs((panelHandleRef.current?.getSize() ?? 0) - _minSize) < 0.01) {
206+
if (Math.abs((panelHandleRef.current?.getSize() ?? 0) - _defaultSize) < 0.01) {
207207
collapse();
208208
return;
209209
}
210210

211211
// Otherwise, resize to the min size
212212
panelHandleRef.current?.resize(_defaultSize);
213-
}, [_defaultSize, _minSize, collapse]);
213+
}, [_defaultSize, collapse]);
214214

215215
return {
216216
ref: panelHandleRef,

0 commit comments

Comments
 (0)