mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fixes canvas failing to scale on first run
This commit is contained in:
parent
f5e8ffe7b4
commit
a3a0a87f55
@ -3,6 +3,7 @@ import { useLayoutEffect, useRef } from 'react';
|
||||
import { useAppDispatch, useAppSelector } from 'app/store';
|
||||
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||
import {
|
||||
resizeAndScaleCanvas,
|
||||
resizeCanvas,
|
||||
setCanvasContainerDimensions,
|
||||
setDoesCanvasNeedScaling,
|
||||
@ -52,7 +53,11 @@ const IAICanvasResizer = () => {
|
||||
})
|
||||
);
|
||||
|
||||
dispatch(resizeCanvas());
|
||||
if (!isCanvasInitialized) {
|
||||
dispatch(resizeAndScaleCanvas());
|
||||
} else {
|
||||
dispatch(resizeCanvas());
|
||||
}
|
||||
|
||||
dispatch(setDoesCanvasNeedScaling(false));
|
||||
}, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user