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(() => {
|
const handleReset = useCallback(() => {
|
||||||
dispatch(setHeight(initial));
|
dispatch(setHeight(initial));
|
||||||
if (aspectRatio) dispatch(setWidth(roundToEight(height * aspectRatio)));
|
if (aspectRatio) dispatch(setWidth(roundToEight(initial * aspectRatio)));
|
||||||
}, [dispatch, initial, height, aspectRatio]);
|
}, [dispatch, initial, aspectRatio]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IAISlider
|
<IAISlider
|
||||||
|
@ -52,8 +52,8 @@ const ParamWidth = (props: ParamWidthProps) => {
|
|||||||
|
|
||||||
const handleReset = useCallback(() => {
|
const handleReset = useCallback(() => {
|
||||||
dispatch(setWidth(initial));
|
dispatch(setWidth(initial));
|
||||||
if (aspectRatio) dispatch(setHeight(roundToEight(width / aspectRatio)));
|
if (aspectRatio) dispatch(setHeight(roundToEight(initial / aspectRatio)));
|
||||||
}, [dispatch, initial, width, aspectRatio]);
|
}, [dispatch, initial, aspectRatio]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IAISlider
|
<IAISlider
|
||||||
|
Loading…
Reference in New Issue
Block a user