on xenial help sign in
Fix ScopesList not being under finger

Do not take into the account the initial distance that took the movement to be accepted to calculate the position Fixes: #1403045 Approved by: Andrea Cimitan, PS Jenkins bot

commitde36445446d33d8ffe4233ce42ea60cd3c4915f1 authorAlbert Astals <albert.astals@canonical.com> dateFri 9 Jan 2015, 10:39 (12 years ago) parentb4ed4a2c84a2e5
1 file changed+3−8
qml/Dash/Dash.qml+3−8
qml/Dash/Dash.qml+3−8
@@ -334,28 +334,23 @@ Showable {
334334 height: units.gu(2)
335335
336336 onSceneDistanceChanged: {
337− if (status == DirectionalDragArea.Recognized && initialSceneDistance != -1) {
337+ if (status == DirectionalDragArea.Recognized) {
338338 bottomEdgeController.enableAnimation = false;
339− var deltaDistance = sceneDistance - initialSceneDistance;
340− bottomEdgeController.progress = Math.max(0, Math.min(1, deltaDistance / fullMovement));
339+ bottomEdgeController.progress = Math.max(0, Math.min(1, sceneDistance / fullMovement));
341340 }
342341 }
343342
344343 property int previousStatus: -1
345344 property int currentStatus: DirectionalDragArea.WaitingForTouch
346− property real initialSceneDistance: -1
347345
348346 onStatusChanged: {
349347 previousStatus = currentStatus;
350348 currentStatus = status;
351349
352− if (status == DirectionalDragArea.Recognized) {
353− initialSceneDistance = sceneDistance;
354− } else if (status == DirectionalDragArea.WaitingForTouch &&
350+ if (status == DirectionalDragArea.WaitingForTouch &&
355351 previousStatus == DirectionalDragArea.Recognized) {
356352 bottomEdgeController.enableAnimation = true;
357353 bottomEdgeController.progress = (bottomEdgeController.progress > 0.2) ? 1 : 0;
358− initialSceneDistance = -1;
359354 }
360355 }
361356 }