on xenial help sign in
improve comments around progress a bit
commit1746bb870b96a4579a809e3f8085a089098bed07 authorMichael Zanetti <michael.zanetti@canonical.com> dateFri 18 Jul 2014, 18:29 (12 years ago) parent99e3039
1 file changed+8−4
qml/Stages/PhoneStage.qml+8−4
qml/Stages/PhoneStage.qml+8−4
@@ -288,16 +288,20 @@ Item {
288288 }
289289
290290 // Each tile has a different progress value running from 0 to 1.
291− // A progress value of 0 means the tile is at the right edge. 1 means the tile has reched the left edge.
291+ // 0: means the tile is at the right edge.
292+ // 1: means the tile has finished the main animation towards the left edge.
293+ // >1: after the main animation has finished, tiles will continue to move very slowly to the left
292294 progress: {
293295 var tileProgress = (spreadView.shiftedContentX - behavioredIndex * spreadView.tileDistance) / spreadView.width;
294296 // Tile 1 needs to move directly from the beginning...
295297 if (behavioredIndex == 1 && spreadView.phase < 2) {
296298 tileProgress += spreadView.tileDistance / spreadView.width;
297299 }
298− // Limiting progress to ~0 and 1.7 to avoid binding calculations when tiles are either
299− // outside the screen on the right (progress < 0) or hidden by other tiles on the left
300− // (> 1.7). Using 0.0001 to differentiate when a tile should still be visible (==0)
300+ // Limiting progress to ~0 and 1.7 to avoid binding calculations when tiles are not
301+ // visible.
302+ // < 0 : The tile is outside the screen on the right
303+ // > 1.7: The tile is *very* close to the left edge and covered by other tiles now.
304+ // Using 0.0001 to differentiate when a tile should still be visible (==0)
301305 // or we can hide it (< 0)
302306 tileProgress = Math.max(-0.0001, Math.min(1.7, tileProgress));
303307 return tileProgress;