Browse Source

Replace item offset with single vertical offset

Change-Id: I15aa0677392fd7dc33dc876e436fc1e5e3db00d2
Donald Carr 9 years ago
parent
commit
1472e93e98
1 changed files with 4 additions and 4 deletions
  1. 4 4
      qml/physics/Physics.qml

+ 4 - 4
qml/physics/Physics.qml

@@ -19,7 +19,7 @@ View {
         id: physicsSettings
         id: physicsSettings
         category: "Physics"
         category: "Physics"
 
 
-        property int itemTravel: 0
+        property int verticalOffset: 1
         property real pace: 1
         property real pace: 1
         property bool globalWorld: false
         property bool globalWorld: false
         // Very computationally heavy: 40% vs 20% for 0.1 vs 0
         // Very computationally heavy: 40% vs 20% for 0.1 vs 0
@@ -70,8 +70,8 @@ View {
                 image.beyondThePale.connect(removeImage)
                 image.beyondThePale.connect(removeImage)
                 image.world = physicsSettings.globalWorld ? world : isolatedWorld
                 image.world = physicsSettings.globalWorld ? world : isolatedWorld
                 image.x = xOffset
                 image.x = xOffset
-                stackHeight += (image.height + physicsSettings.itemTravel)
-                image.y = floor.y - stackHeight
+                stackHeight += image.height
+                image.y = floor.y - stackHeight - physicsSettings.verticalOffset
 
 
                 pictureArray.push(image)
                 pictureArray.push(image)
                 globalUtil.itemCount++
                 globalUtil.itemCount++
@@ -81,7 +81,7 @@ View {
                 if (image.effect) {
                 if (image.effect) {
                     image.effect.destroy()
                     image.effect.destroy()
                 }
                 }
-                stackHeight -= (image.height + physicsSettings.itemTravel)
+                stackHeight -= image.height
                 image.destroy()
                 image.destroy()
                 globalUtil.itemCount--
                 globalUtil.itemCount--
             }
             }