calculate dragged distance based on flickable movement, not on DDA's distance property
commit8167701b5f882e3163bf891006352e6fdc8b9315
authorMichael Zanetti <michael.zanetti@canonical.com>
dateWed 5 Feb 2014, 12:48 (13 years ago)
parent47a05f6
qml/Stages/PhoneStage.qml+2−4
@@ -243,11 +243,9 @@ Item {
243243 }
244244 gesturePoints = [];
245245
246− if (oneWayFlick && distance < -units.gu(2) && distance > spreadView.positionMarker1 * -spreadView.width) {
246+ if (oneWayFlick && spreadView.shiftedContentX > units.gu(2) && spreadView.shiftedContentX < spreadView.positionMarker1 * spreadView.width) {
247247 spreadView.snapTo(1)
248− }
249−
250− if (!dragging && attachedToView) {
248+ } else if (!dragging && attachedToView) {
251249 spreadView.snap();
252250 }
253251 }