From 7d1c95058e9cef14a94318901d9303243da18c4e Mon Sep 17 00:00:00 2001 From: zmtzawqlp Date: Mon, 23 Dec 2024 22:15:01 +0800 Subject: [PATCH] ## 9.0.9 Fix drag crop rect can't zoom in the image(#723) --- CHANGELOG.md | 4 ++++ lib/src/editor/crop_layer.dart | 16 +++++++++------- pubspec.yaml | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea33be5..50182eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 9.0.9 + +* Fix drag crop rect can't zoom in the image(#723) + ## 9.0.8 * Fix the issue with 90-degree judgment when rotate image. diff --git a/lib/src/editor/crop_layer.dart b/lib/src/editor/crop_layer.dart index bb86fda..091e0cd 100644 --- a/lib/src/editor/crop_layer.dart +++ b/lib/src/editor/crop_layer.dart @@ -344,17 +344,19 @@ class ExtendedImageCropLayerState extends State default: } - ///make sure crop rect doesn't out of image rect - result = Rect.fromPoints( - Offset(max(result!.left, cropRectLayoutRect!.left), - max(result.top, cropRectLayoutRect.top)), - Offset(min(result.right, cropRectLayoutRect.right), - min(result.bottom, cropRectLayoutRect.bottom))); + // drag crop rect to zoom in image, to fix #723 + + // make sure crop rect doesn't out of image rect + // result = Rect.fromPoints( + // Offset(max(result!.left, cropRectLayoutRect!.left), + // max(result.top, cropRectLayoutRect.top)), + // Offset(min(result.right, cropRectLayoutRect.right), + // min(result.bottom, cropRectLayoutRect.bottom))); result = _handleAspectRatio( gWidth, moveType, - result, + result!, cropRectLayoutRect, delta, ); diff --git a/pubspec.yaml b/pubspec.yaml index b3ba986..4a9f864 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: extended_image description: Official extension image, support placeholder(loading)/ failed state, cache network, zoom/pan, photo view, slide out page, editor(crop,rotate,flip), painting etc. -version: 9.0.8 +version: 9.0.9 repository: https://github.com/fluttercandies/extended_image issue_tracker: https://github.com/fluttercandies/extended_image/issues