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
|
### Fixed
|
||||||
|
|
||||||
|
- viewer pan/scale gestures interpreted as fling gestures
|
||||||
- replacing when moving item to vault
|
- replacing when moving item to vault
|
||||||
- exporting item to vault
|
- exporting item to vault
|
||||||
|
|
||||||
|
|
|
@ -197,18 +197,22 @@ class _MagnifierCoreState extends State<MagnifierCore> with TickerProviderStateM
|
||||||
if (_isFlingGesture(estimate, _flingPointerKind, Axis.horizontal)) {
|
if (_isFlingGesture(estimate, _flingPointerKind, Axis.horizontal)) {
|
||||||
final left = _mayFlingLTRB.item1;
|
final left = _mayFlingLTRB.item1;
|
||||||
final right = _mayFlingLTRB.item3;
|
final right = _mayFlingLTRB.item3;
|
||||||
if (left) {
|
if (left ^ right) {
|
||||||
onFling(AxisDirection.left);
|
if (left) {
|
||||||
} else if (right) {
|
onFling(AxisDirection.left);
|
||||||
onFling(AxisDirection.right);
|
} else if (right) {
|
||||||
|
onFling(AxisDirection.right);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (_isFlingGesture(estimate, _flingPointerKind, Axis.vertical)) {
|
} else if (_isFlingGesture(estimate, _flingPointerKind, Axis.vertical)) {
|
||||||
final up = _mayFlingLTRB.item2;
|
final up = _mayFlingLTRB.item2;
|
||||||
final down = _mayFlingLTRB.item4;
|
final down = _mayFlingLTRB.item4;
|
||||||
if (up) {
|
if (up ^ down) {
|
||||||
onFling(AxisDirection.up);
|
if (up) {
|
||||||
} else if (down) {
|
onFling(AxisDirection.up);
|
||||||
onFling(AxisDirection.down);
|
} else if (down) {
|
||||||
|
onFling(AxisDirection.down);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue