Fix gallery width size for Outpainting

Also fixes the canvas resizing failing n fast pushes
This commit is contained in:
blessedcoolant 2022-11-13 10:51:45 +13:00
parent 4e34194479
commit c223d93b4d

View File

@ -76,7 +76,7 @@ export default function ImageGallery() {
return;
}
if (activeTabName === 'inpainting') {
if (activeTabName === 'inpainting' || activeTabName === 'outpainting') {
dispatch(setGalleryWidth(190));
setGalleryMinWidth(190);
setGalleryMaxWidth(190);
@ -91,7 +91,7 @@ export default function ImageGallery() {
);
setGalleryMaxWidth(590);
}
dispatch(setDoesCanvasNeedScaling(true));
setTimeout(() => dispatch(setDoesCanvasNeedScaling(true)), 400);
}, [dispatch, activeTabName, shouldPinGallery, galleryWidth, isLightBoxOpen]);
useEffect(() => {