refboard: support rotated image crop editing

This commit is contained in:
Hiren Kangad
2026-03-13 11:21:27 +05:30
parent 9502f89a06
commit dd1578110b
3 changed files with 157 additions and 61 deletions
+1 -6
View File
@@ -501,13 +501,8 @@ export default function Editor({ isPublicView }: EditorProps) {
if (showInvalidToast) showToast('Select a single image to crop');
return;
}
const image = items[0];
if (Math.abs(image.data.angle % 360) > 0.001) {
showToast('Crop for rotated images is not supported yet');
return;
}
selection.setEnabled(false);
cropOverlayRef.current.start(image);
cropOverlayRef.current.start(items[0]);
}, [showToast, cropOverlayRef]);
// Keyboard shortcuts