fix: typo, change shouldFitImageSize default value

This commit is contained in:
symant233 2024-04-04 20:17:48 +08:00 committed by psychedelicious
parent d32e557e50
commit b783679b9f
2 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ const IAICanvasSettingsButtonPopover = () => {
const shouldSnapToGrid = useAppSelector((s) => s.canvas.shouldSnapToGrid); const shouldSnapToGrid = useAppSelector((s) => s.canvas.shouldSnapToGrid);
const shouldRestrictStrokesToBox = useAppSelector((s) => s.canvas.shouldRestrictStrokesToBox); const shouldRestrictStrokesToBox = useAppSelector((s) => s.canvas.shouldRestrictStrokesToBox);
const shouldAntialias = useAppSelector((s) => s.canvas.shouldAntialias); const shouldAntialias = useAppSelector((s) => s.canvas.shouldAntialias);
const sholdFitImageSize = useAppSelector((s) => s.canvas.shouldFitImageSize); const shouldFitImageSize = useAppSelector((s) => s.canvas.shouldFitImageSize);
useHotkeys( useHotkeys(
['n'], ['n'],
@ -104,7 +104,7 @@ const IAICanvasSettingsButtonPopover = () => {
(e: ChangeEvent<HTMLInputElement>) => dispatch(setShouldAntialias(e.target.checked)), (e: ChangeEvent<HTMLInputElement>) => dispatch(setShouldAntialias(e.target.checked)),
[dispatch] [dispatch]
); );
const handleChangeSholdFitImageSize = useCallback( const handleChangeShouldFitImageSize = useCallback(
(e: ChangeEvent<HTMLInputElement>) => dispatch(setShouldFitImageSize(e.target.checked)), (e: ChangeEvent<HTMLInputElement>) => dispatch(setShouldFitImageSize(e.target.checked)),
[dispatch] [dispatch]
); );
@ -173,7 +173,7 @@ const IAICanvasSettingsButtonPopover = () => {
</FormControl> </FormControl>
<FormControl> <FormControl>
<FormLabel>{t('unifiedCanvas.initialFitImageSize')}</FormLabel> <FormLabel>{t('unifiedCanvas.initialFitImageSize')}</FormLabel>
<Checkbox isChecked={sholdFitImageSize} onChange={handleChangeSholdFitImageSize} /> <Checkbox isChecked={shouldFitImageSize} onChange={handleChangeShouldFitImageSize} />
</FormControl> </FormControl>
</FormControlGroup> </FormControlGroup>
<ClearCanvasHistoryButtonModal /> <ClearCanvasHistoryButtonModal />

View File

@ -66,7 +66,7 @@ const initialCanvasState: CanvasState = {
shouldAutoSave: false, shouldAutoSave: false,
shouldCropToBoundingBoxOnSave: false, shouldCropToBoundingBoxOnSave: false,
shouldDarkenOutsideBoundingBox: false, shouldDarkenOutsideBoundingBox: false,
shouldFitImageSize: false, shouldFitImageSize: true,
shouldInvertBrushSizeScrollDirection: false, shouldInvertBrushSizeScrollDirection: false,
shouldLockBoundingBox: false, shouldLockBoundingBox: false,
shouldPreserveMaskedArea: false, shouldPreserveMaskedArea: false,