Skip to content

Commit

Permalink
## 9.0.9 Fix drag crop rect can't zoom in the image(#723)
Browse files Browse the repository at this point in the history
  • Loading branch information
zmtzawqlp committed Dec 24, 2024
1 parent d43d46e commit 7d1c950
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
16 changes: 9 additions & 7 deletions lib/src/editor/crop_layer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -344,17 +344,19 @@ class ExtendedImageCropLayerState extends State<ExtendedImageCropLayer>
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,
);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 7d1c950

Please sign in to comment.