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.94k stars 505 forks source link

[Discussions] 使用ExtendedImageGesturePageView的时候,双指放大图片不是很灵敏 #631

Closed FZY456 closed 1 month ago

FZY456 commented 1 year ago

Content

用食指和中指向俩边滑动以放大图片,但总会识别成左右切换图片。

我是直接下载demo运行在安卓手机上,下面是测试的视频。

https://github.com/fluttercandies/extended_image/assets/143068367/f662e827-4f16-4362-9b27-901c42afb661

环境:

 Flutter (Channel stable, 3.13.5, on Microsoft Windows [版本 10.0.19042.630], locale zh-CN)
    • Flutter version 3.13.5 on channel stable at D:\flutter\flutter                          
    • Upstream repository https://github.com/flutter/flutter/                                 
    • FLUTTER_GIT_URL = https://github.com/flutter/flutter/                                   
    • Framework revision 12fccda598 (4 weeks ago), 2023-09-19 13:56:11 -0700                  
    • Engine revision bd986c5ed2                                                              
    • Dart version 3.1.2                                                                      
    • DevTools version 2.25.0                                                                 
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[√] Connected device (4 available)
    • WLZ AL10 (mobile) • FMLDU19C13016286 • android-arm64  • Android 12 (API 31)
liangxianshen commented 1 year ago

I also think it needs to be optimized.

chenshandong commented 1 year ago

我也遇到同样的问题

zmtzawqlp commented 1 year ago

https://github.com/fluttercandies/extended_image/blob/7b444abd813b4a5d256f4196045327dd48840754/lib/src/gesture_detector/drag_gesture_recognizer.dart#L13

可以自定义下这里的规则,这就是手势冲突问题,这个就要看个人的习惯了。。比如有2以上触摸点的时候,就让水平垂直的手势不获胜。

QixianWu commented 1 year ago

优化后,体验有所提升 if(_velocityTrackers.keys.length >=2){ return false; }

zmtzawqlp commented 1 year ago

怎么说呢,这个算是个人的感知吧,这地方就是为了更进一步区分是垂直水平拖动还是 双指多指缩放的

dev-juyoung commented 1 year ago

https://github.com/fluttercandies/extended_image/blob/7b444abd813b4a5d256f4196045327dd48840754/lib/src/gesture_detector/drag_gesture_recognizer.dart#L13

可以自定义下这里的规则,这就是手势冲突问题,这个就要看个人的习惯了。。比如有2以上触摸点的时候,就让水平垂直的手势不获胜。

Is there any way to control this externally? can modify the library code after receiving the pull, but I would like to avoid that method as much as possible.

zmtzawqlp commented 1 year ago

https://github.com/fluttercandies/extended_image/blob/7b444abd813b4a5d256f4196045327dd48840754/lib/src/gesture_detector/drag_gesture_recognizer.dart#L13

可以自定义下这里的规则,这就是手势冲突问题,这个就要看个人的习惯了。。比如有2以上触摸点的时候,就让水平垂直的手势不获胜。

Is there any way to control this externally? can modify the library code after receiving the pull, but I would like to avoid that method as much as possible.

we can't public it , it has much private properties, so you can fork this package, and custom your logic

dev-juyoung commented 1 year ago

https://github.com/fluttercandies/extended_image/blob/7b444abd813b4a5d256f4196045327dd48840754/lib/src/gesture_detector/drag_gesture_recognizer.dart#L13

可以自定义下这里的规则,这就是手势冲突问题,这个就要看个人的习惯了。。比如有2以上触摸点的时候,就让水平垂直的手势不获胜。

Is there any way to control this externally? can modify the library code after receiving the pull, but I would like to avoid that method as much as possible.

we can't public it , it has much private properties, so you can fork this package, and custom your logic

Thanks for the reply. If you can't make it public, it seems like gesture recognition for pinch zoom and page switching needs to be improved.

carrot2018 commented 11 months ago

我也遇到了,缩放非常不流畅,缩放手势会跟滑动手势冲突,应该修改下手势竞争规则

chinghoi commented 10 months ago

缩放经常不成功, 缩放的时候会走左右滑动的手势

lakatosdavid commented 8 months ago

yes this should be fixed! please very annoying

chenjiangmin commented 6 months ago

@zmtzawqlp 请问下这个可以优化么 确实有些奇怪

FairyWorld commented 3 months ago

我也遇到同样的问题

zmtzawqlp commented 1 month ago

please update to 8.3.1 version. This issue to due to ExtendedVelocityTracker builder was missed, sorry to delay fixing.

The versions to fit beyond flutter 3.10.0 are published, please update it.

zmtzawqlp commented 1 month ago

This issue is coming from a merge pr

https://github.com/fluttercandies/extended_image/commit/fc1cb041b01e3397a772a4131ccbd9fa3b6c1ef0

zmtzawqlp commented 1 month ago

The versions to fit beyond flutter 3.10.0 are updated. please update the version at your side.