mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): do not resize panel when window resizes if panel is collapsed
This commit is contained in:
parent
7a57bc99cf
commit
01bab58b20
@ -125,8 +125,9 @@ export const usePanel = (arg: UsePanelOptions): UsePanelReturn => {
|
|||||||
|
|
||||||
_setMinSize(minSizePct);
|
_setMinSize(minSizePct);
|
||||||
|
|
||||||
|
const currentSize = panelHandleRef.current.getSize();
|
||||||
// Resize if the current size is smaller than the new min size - happens when the window is resized smaller
|
// Resize if the current size is smaller than the new min size - happens when the window is resized smaller
|
||||||
if (panelHandleRef.current.getSize() < minSizePct) {
|
if (currentSize && currentSize < minSizePct) {
|
||||||
panelHandleRef.current.resize(minSizePct);
|
panelHandleRef.current.resize(minSizePct);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user