Attempts to fix #1297

This commit is contained in:
psychedelicious 2022-10-30 16:13:10 +11:00
parent d3a09f1284
commit 050d72478e

View File

@ -11,6 +11,7 @@ const InpaintingCanvasPlaceholder = () => {
const ref = useRef<HTMLDivElement>(null);
useLayoutEffect(() => {
window.setTimeout(() => {
if (!ref.current || !imageToInpaint) return;
const width = ref.current.clientWidth;
@ -22,6 +23,7 @@ const InpaintingCanvasPlaceholder = () => {
);
dispatch(setStageScale(scale));
}, 0);
}, [dispatch, imageToInpaint, needsCache]);
return (