Fixes bounding box slider & adds canvas caching on gallery actions

This commit is contained in:
psychedelicious 2022-10-29 18:32:01 +11:00
parent 162e420e9c
commit 0290cd6814
2 changed files with 4 additions and 4 deletions

View File

@ -55,7 +55,6 @@ const IAISlider = (props: IAISliderProps) => {
<Slider
className={`invokeai__slider-root`}
aria-label={label}
focusThumbOnChange={false}
{...rest}
>
<SliderTrack

View File

@ -82,6 +82,7 @@ export default function ImageGallery() {
);
setGalleryMaxWidth(590);
}
dispatch(setNeedsCache(true));
}, [dispatch, activeTabName, shouldPinGallery, galleryWidth]);
useEffect(() => {
@ -100,17 +101,15 @@ export default function ImageGallery() {
};
const handleToggleGallery = () => {
dispatch(setNeedsCache(true));
shouldShowGallery ? handleCloseGallery() : handleOpenGallery();
};
const handleOpenGallery = () => {
dispatch(setNeedsCache(true));
dispatch(setShouldShowGallery(true));
dispatch(setNeedsCache(true));
};
const handleCloseGallery = () => {
dispatch(setNeedsCache(true));
dispatch(
setGalleryScrollPosition(
galleryContainerRef.current ? galleryContainerRef.current.scrollTop : 0
@ -118,6 +117,7 @@ export default function ImageGallery() {
);
dispatch(setShouldShowGallery(false));
dispatch(setShouldHoldGalleryOpen(false));
dispatch(setNeedsCache(true));
};
const handleClickLoadMore = () => {
@ -126,6 +126,7 @@ export default function ImageGallery() {
const handleChangeGalleryImageMinimumWidth = (v: number) => {
dispatch(setGalleryImageMinimumWidth(v));
dispatch(setNeedsCache(true));
};
const setCloseGalleryTimer = () => {