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
35dba1381c
commit
c48a1092f7
@ -123,10 +123,8 @@ export default function ImageGallery() {
|
||||
galleryContainerRef.current ? galleryContainerRef.current.scrollTop : 0
|
||||
)
|
||||
);
|
||||
if (!shouldHoldGalleryOpen) {
|
||||
dispatch(setShouldHoldGalleryOpen(false));
|
||||
}
|
||||
dispatch(setShouldShowGallery(false));
|
||||
dispatch(setShouldHoldGalleryOpen(false));
|
||||
};
|
||||
|
||||
const handleClickLoadMore = () => {
|
||||
@ -254,7 +252,7 @@ export default function ImageGallery() {
|
||||
return (
|
||||
<CSSTransition
|
||||
nodeRef={galleryRef}
|
||||
in={shouldShowGallery || shouldHoldGalleryOpen}
|
||||
in={shouldShowGallery || (shouldHoldGalleryOpen && !shouldPinGallery)}
|
||||
unmountOnExit
|
||||
timeout={200}
|
||||
classNames="image-gallery-area"
|
||||
|
@ -30,7 +30,7 @@ const initialState: GalleryState = {
|
||||
shouldShowGallery: true,
|
||||
galleryScrollPosition: 0,
|
||||
galleryImageMinimumWidth: 64,
|
||||
galleryImageObjectFit: 'contain',
|
||||
galleryImageObjectFit: 'cover',
|
||||
shouldHoldGalleryOpen: false,
|
||||
shouldAutoSwitchToNewImages: true,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user