Skip to content

Commit 4412143

Browse files
feat(ui): clean up editor
1 parent de11caf commit 4412143

File tree

2 files changed

+156
-164
lines changed

2 files changed

+156
-164
lines changed

invokeai/frontend/web/src/features/editImageModal/components/EditorContainer.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export const EditorContainer = ({ editor, imageName }: Props) => {
7171
width: imageDTO.width,
7272
height: imageDTO.height,
7373
});
74+
editor.fitToContainer();
7475
},
7576
[editor]
7677
);
@@ -133,22 +134,14 @@ export const EditorContainer = ({ editor, imageName }: Props) => {
133134

134135
const handleApplyCrop = useCallback(() => {
135136
editor.applyCrop();
136-
// setIsCropping(false);
137-
// setHasCropBbox(true);
138-
// setCropInfo('');
139-
setAspectRatio('free');
140137
}, [editor]);
141138

142139
const handleCancelCrop = useCallback(() => {
143140
editor.cancelCrop();
144-
// setIsCropping(false);
145-
// setCropInfo('');
146-
setAspectRatio('free');
147141
}, [editor]);
148142

149143
const handleResetCrop = useCallback(() => {
150144
editor.resetCrop();
151-
// setHasCropBbox(false);
152145
}, [editor]);
153146

154147
const handleExport = useCallback(async () => {

0 commit comments

Comments
 (0)