@@ -44,6 +44,9 @@ Rectangle {
46 onInverseProgressChanged: {
46 onInverseProgressChanged: {
47+ // This can't be a simple binding because that would be triggered after this handler
48+ // while we need it active before doing the anition left/right
49+ priv.animateX = (inverseProgress == 0)
47 if (inverseProgress == 0 && priv.oldInverseProgress > 0) {
50 if (inverseProgress == 0 && priv.oldInverseProgress > 0) {
48 // left edge drag released. Minimum distance is given by design.
51 // left edge drag released. Minimum distance is given by design.
49 if (priv.oldInverseProgress > units.gu(22)) {
52 if (priv.oldInverseProgress > units.gu(22)) {
@@ -92,6 +95,7 @@ Rectangle {
92 property var focusedAppDelegate: null
95 property var focusedAppDelegate: null
94 property real oldInverseProgress: 0
97 property real oldInverseProgress: 0
98+ property bool animateX: true
96 onFocusedAppIdChanged: focusedAppDelegate = spreadRepeater.itemAt(0);
100 onFocusedAppIdChanged: focusedAppDelegate = spreadRepeater.itemAt(0);
@@ -311,7 +315,8 @@ Rectangle {
311 Behavior on x {
315 Behavior on x {
312 enabled: root.spreadEnabled &&
316 enabled: root.spreadEnabled &&
313 !spreadView.active &&
317 !spreadView.active &&
314− !snapAnimation.running
318+ !snapAnimation.running &&
315 UbuntuNumberAnimation {
320 UbuntuNumberAnimation {
316 duration: UbuntuAnimation.FastDuration
321 duration: UbuntuAnimation.FastDuration
317 onRunningChanged: {
322 onRunningChanged: {