fluttercandies / extended_image

A powerful official extension library of image, which support placeholder(loading)/ failed state, cache network, zoom pan image, photo view, slide out page, editor(crop,rotate,flip), paint custom etc.
https://fluttercandies.github.io/extended_image/
MIT License
1.93k stars 504 forks source link

[Bug report] 当缩放到最小然后,按住图片平移后,图片会定住,不能回弹到原始尺寸 #686

Open yixiu1043 opened 4 months ago

yixiu1043 commented 4 months ago

Version

8.2.1

Platforms

Android, iOS

Device Model

All Device Model

flutter info

All flutter version

How to reproduce?

https://github.com/fluttercandies/extended_image/assets/44249717/4efb9758-586b-4cb9-a01a-fdbb2d1f227e

Logs

No response

Example code (optional)

No response

Contact

No response

zmtzawqlp commented 4 months ago

回弹到原始尺寸? 好像没有这个功能呢?

yixiu1043 commented 4 months ago

回弹到原始尺寸? 好像没有这个功能呢?

这是一个缩放BUG,在缩放到最小值后停顿,恢复到原始尺寸的动画没有触发。

yixiu1043 commented 4 months ago
gesture.dart > handleScaleEnd
if (extendedImageSlidePageState != null &&
        extendedImageSlidePageState!.isSliding) {
      extendedImageSlidePageState!.endSlide(details);
      final double? initialScale = _gestureConfig?.initialScale ?? 1.0;
      if (_gestureDetails!.totalScale!.greaterThan(initialScale!) || _gestureDetails!.totalScale!.equalTo(initialScale) ) {
        return;
      }
    }