Viewer: fixed pan/scale gestures interpreted as fling gestures
This commit is contained in:
parent
6696f97ab2
commit
056bc9b158
2 changed files with 13 additions and 8 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -197,14 +197,17 @@ class _MagnifierCoreState extends State<MagnifierCore> with TickerProviderStateM
|
|||
if (_isFlingGesture(estimate, _flingPointerKind, Axis.horizontal)) {
|
||||
final left = _mayFlingLTRB.item1;
|
||||
final right = _mayFlingLTRB.item3;
|
||||
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 ^ down) {
|
||||
if (up) {
|
||||
onFling(AxisDirection.up);
|
||||
} else if (down) {
|
||||
|
@ -212,6 +215,7 @@ class _MagnifierCoreState extends State<MagnifierCore> with TickerProviderStateM
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final _position = controller.position;
|
||||
final _scale = controller.scale!;
|
||||
|
|
Loading…
Reference in a new issue