mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fixes bug with gallery not closing
This commit is contained in:
parent
2c9747fd41
commit
765092eb12
@ -123,10 +123,8 @@ export default function ImageGallery() {
|
|||||||
galleryContainerRef.current ? galleryContainerRef.current.scrollTop : 0
|
galleryContainerRef.current ? galleryContainerRef.current.scrollTop : 0
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if (!shouldHoldGalleryOpen) {
|
|
||||||
dispatch(setShouldHoldGalleryOpen(false));
|
|
||||||
}
|
|
||||||
dispatch(setShouldShowGallery(false));
|
dispatch(setShouldShowGallery(false));
|
||||||
|
dispatch(setShouldHoldGalleryOpen(false));
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleClickLoadMore = () => {
|
const handleClickLoadMore = () => {
|
||||||
@ -254,7 +252,7 @@ export default function ImageGallery() {
|
|||||||
return (
|
return (
|
||||||
<CSSTransition
|
<CSSTransition
|
||||||
nodeRef={galleryRef}
|
nodeRef={galleryRef}
|
||||||
in={shouldShowGallery || shouldHoldGalleryOpen}
|
in={shouldShowGallery || (shouldHoldGalleryOpen && !shouldPinGallery)}
|
||||||
unmountOnExit
|
unmountOnExit
|
||||||
timeout={200}
|
timeout={200}
|
||||||
classNames="image-gallery-area"
|
classNames="image-gallery-area"
|
||||||
|
@ -30,7 +30,7 @@ const initialState: GalleryState = {
|
|||||||
shouldShowGallery: true,
|
shouldShowGallery: true,
|
||||||
galleryScrollPosition: 0,
|
galleryScrollPosition: 0,
|
||||||
galleryImageMinimumWidth: 64,
|
galleryImageMinimumWidth: 64,
|
||||||
galleryImageObjectFit: 'contain',
|
galleryImageObjectFit: 'cover',
|
||||||
shouldHoldGalleryOpen: false,
|
shouldHoldGalleryOpen: false,
|
||||||
shouldAutoSwitchToNewImages: true,
|
shouldAutoSwitchToNewImages: true,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user