diff --git a/CHANGELOG.md b/CHANGELOG.md index 781422e5f..42e205fef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file. ### Fixed +- viewer pan/scale gestures interpreted as fling gestures - replacing when moving item to vault - exporting item to vault diff --git a/plugins/aves_magnifier/lib/src/core/core.dart b/plugins/aves_magnifier/lib/src/core/core.dart index 531934cd6..58edae587 100644 --- a/plugins/aves_magnifier/lib/src/core/core.dart +++ b/plugins/aves_magnifier/lib/src/core/core.dart @@ -197,18 +197,22 @@ class _MagnifierCoreState extends State with TickerProviderStateM if (_isFlingGesture(estimate, _flingPointerKind, Axis.horizontal)) { final left = _mayFlingLTRB.item1; final right = _mayFlingLTRB.item3; - if (left) { - onFling(AxisDirection.left); - } else if (right) { - onFling(AxisDirection.right); + if (left ^ right) { + if (left) { + onFling(AxisDirection.left); + } else if (right) { + onFling(AxisDirection.right); + } } } else if (_isFlingGesture(estimate, _flingPointerKind, Axis.vertical)) { final up = _mayFlingLTRB.item2; final down = _mayFlingLTRB.item4; - if (up) { - onFling(AxisDirection.up); - } else if (down) { - onFling(AxisDirection.down); + if (up ^ down) { + if (up) { + onFling(AxisDirection.up); + } else if (down) { + onFling(AxisDirection.down); + } } } }