fix(ui): use optimal size when using control image dims

This commit is contained in:
psychedelicious 2024-04-30 10:09:53 +10:00 committed by Kent Keirsey
parent fe459295ea
commit d14b315bc6

View File

@ -100,8 +100,8 @@ const ControlAdapterImagePreview = ({ isSmall, id }: Props) => {
controlImage.width / controlImage.height,
optimalDimension * optimalDimension
);
dispatch(widthChanged({ width: controlImage.width, updateAspectRatio: true }));
dispatch(heightChanged({ height: controlImage.height, updateAspectRatio: true }));
dispatch(widthChanged({ width, updateAspectRatio: true }));
dispatch(heightChanged({ height, updateAspectRatio: true }));
}
}, [controlImage, activeTabName, dispatch, optimalDimension]);