mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fixes bounding box slider & adds canvas caching on gallery actions
This commit is contained in:
parent
162e420e9c
commit
0290cd6814
@ -55,7 +55,6 @@ const IAISlider = (props: IAISliderProps) => {
|
|||||||
<Slider
|
<Slider
|
||||||
className={`invokeai__slider-root`}
|
className={`invokeai__slider-root`}
|
||||||
aria-label={label}
|
aria-label={label}
|
||||||
focusThumbOnChange={false}
|
|
||||||
{...rest}
|
{...rest}
|
||||||
>
|
>
|
||||||
<SliderTrack
|
<SliderTrack
|
||||||
|
@ -82,6 +82,7 @@ export default function ImageGallery() {
|
|||||||
);
|
);
|
||||||
setGalleryMaxWidth(590);
|
setGalleryMaxWidth(590);
|
||||||
}
|
}
|
||||||
|
dispatch(setNeedsCache(true));
|
||||||
}, [dispatch, activeTabName, shouldPinGallery, galleryWidth]);
|
}, [dispatch, activeTabName, shouldPinGallery, galleryWidth]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -100,17 +101,15 @@ export default function ImageGallery() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleToggleGallery = () => {
|
const handleToggleGallery = () => {
|
||||||
dispatch(setNeedsCache(true));
|
|
||||||
shouldShowGallery ? handleCloseGallery() : handleOpenGallery();
|
shouldShowGallery ? handleCloseGallery() : handleOpenGallery();
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleOpenGallery = () => {
|
const handleOpenGallery = () => {
|
||||||
dispatch(setNeedsCache(true));
|
|
||||||
dispatch(setShouldShowGallery(true));
|
dispatch(setShouldShowGallery(true));
|
||||||
|
dispatch(setNeedsCache(true));
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleCloseGallery = () => {
|
const handleCloseGallery = () => {
|
||||||
dispatch(setNeedsCache(true));
|
|
||||||
dispatch(
|
dispatch(
|
||||||
setGalleryScrollPosition(
|
setGalleryScrollPosition(
|
||||||
galleryContainerRef.current ? galleryContainerRef.current.scrollTop : 0
|
galleryContainerRef.current ? galleryContainerRef.current.scrollTop : 0
|
||||||
@ -118,6 +117,7 @@ export default function ImageGallery() {
|
|||||||
);
|
);
|
||||||
dispatch(setShouldShowGallery(false));
|
dispatch(setShouldShowGallery(false));
|
||||||
dispatch(setShouldHoldGalleryOpen(false));
|
dispatch(setShouldHoldGalleryOpen(false));
|
||||||
|
dispatch(setNeedsCache(true));
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleClickLoadMore = () => {
|
const handleClickLoadMore = () => {
|
||||||
@ -126,6 +126,7 @@ export default function ImageGallery() {
|
|||||||
|
|
||||||
const handleChangeGalleryImageMinimumWidth = (v: number) => {
|
const handleChangeGalleryImageMinimumWidth = (v: number) => {
|
||||||
dispatch(setGalleryImageMinimumWidth(v));
|
dispatch(setGalleryImageMinimumWidth(v));
|
||||||
|
dispatch(setNeedsCache(true));
|
||||||
};
|
};
|
||||||
|
|
||||||
const setCloseGalleryTimer = () => {
|
const setCloseGalleryTimer = () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user