mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix: Reset handler not adjusting correctly
This commit is contained in:
parent
d01d5b6fa9
commit
cafd97e5bc
@ -55,8 +55,8 @@ const ParamHeight = (props: ParamHeightProps) => {
|
||||
|
||||
const handleReset = useCallback(() => {
|
||||
dispatch(setHeight(initial));
|
||||
if (aspectRatio) dispatch(setWidth(roundToEight(height * aspectRatio)));
|
||||
}, [dispatch, initial, height, aspectRatio]);
|
||||
if (aspectRatio) dispatch(setWidth(roundToEight(initial * aspectRatio)));
|
||||
}, [dispatch, initial, aspectRatio]);
|
||||
|
||||
return (
|
||||
<IAISlider
|
||||
|
@ -52,8 +52,8 @@ const ParamWidth = (props: ParamWidthProps) => {
|
||||
|
||||
const handleReset = useCallback(() => {
|
||||
dispatch(setWidth(initial));
|
||||
if (aspectRatio) dispatch(setHeight(roundToEight(width / aspectRatio)));
|
||||
}, [dispatch, initial, width, aspectRatio]);
|
||||
if (aspectRatio) dispatch(setHeight(roundToEight(initial / aspectRatio)));
|
||||
}, [dispatch, initial, aspectRatio]);
|
||||
|
||||
return (
|
||||
<IAISlider
|
||||
|
Loading…
Reference in New Issue
Block a user