Files
Folo/apps/desktop/layer/renderer/src/modules/user
Innei b72ab7dffd fix(avatar-upload): cropping functionality keep aspect
- Added a helper function `constrainCropData` to ensure crop dimensions remain within image boundaries and maintain a 1:1 aspect ratio.
- Updated image loading and cropping logic to utilize the new helper function for better validation of crop data.
- Improved mouse event handling for cropping to ensure accurate resizing and positioning of the crop area.
- Adjusted crop style calculations to account for the actual display size of the image within its container.

These changes aim to provide a more robust and user-friendly experience when uploading and cropping avatars.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-18 13:47:56 +08:00
..