Merge branch 'main' into chore/clean-up-unused-files

This commit is contained in:
psychedelicious 2023-09-02 11:13:15 +10:00 committed by GitHub
commit 3288d9b31a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,22 +104,22 @@ const ControlNetImagePreview = ({ isSmall, controlNet }: Props) => {
]);
const handleSetControlImageToDimensions = useCallback(() => {
if (!processedControlImage) {
if (!controlImage) {
return;
}
if (activeTabName === 'unifiedCanvas') {
dispatch(
setBoundingBoxDimensions({
width: processedControlImage.width,
height: processedControlImage.height,
width: controlImage.width,
height: controlImage.height,
})
);
} else {
dispatch(setWidth(processedControlImage.width));
dispatch(setHeight(processedControlImage.height));
dispatch(setWidth(controlImage.width));
dispatch(setHeight(controlImage.height));
}
}, [processedControlImage, activeTabName, dispatch]);
}, [controlImage, activeTabName, dispatch]);
const handleMouseEnter = useCallback(() => {
setIsMouseOverImage(true);