@@ -34,6 +34,7 @@ Item {
3434 property var initialItem: null
3535 // the non-expanded distance from row offset to center of initial item
3636 property real originalDistanceFromRight: -1
37+ property real originalItemWidth: -1
3738
3839 // calculate the distance from row offset to center of initial item
3940 property real distanceFromRight: {
@@ -48,8 +49,10 @@ Item {
4849 onInitialItemChanged: {
4950 console.log("INITIAL CHANGED ", initialItem)
5051 if (initialItem) {
52+ originalItemWidth = initialItem.width;
5153 originalDistanceFromRight = row.width - initialItem.x - initialItem.width/2;
5254 } else {
55+ originalItemWidth = -1;
5356 originalDistanceFromRight = -1;
5457 }
5558 }
@@ -73,7 +76,7 @@ Item {
7376 anchors.fill: parent
7477 contentWidth: row.width
7578 interactive: expanded
76− clip: true
79+// clip: true
7780
7881 rebound: Transition {
7982 NumberAnimation {
@@ -93,7 +96,7 @@ Item {
9396 }
9497 }
9598
96− onContentXChanged: console.log("contentX: ", contentX)
99+ Behavior on contentX { enabled: !expanded; NumberAnimation { duration: 1000 } }
97100 }
98101
99102 states: [
@@ -122,8 +125,11 @@ Item {
122125 rowOffset: {
123126 if (!initialItem) return 0;
124127 if (distanceFromRight - initialItem.width <= 0) return 0;
128+ if (originalDistanceFromRight + originalItemWidth/2 > flickable.width)
129+ return distanceFromRight - originalDistanceFromRight + initialItem.width/2;
125130
126131 var rowOffset = distanceFromRight - originalDistanceFromRight;
132+ console.log(originalDistanceFromRight + " flickable.width: " +flickable.width)
127133 return rowOffset;
128134 }
129135 }
@@ -149,13 +155,4 @@ Item {
149155 }
150156 }
151157 ]
152−
153− transitions: [
154− Transition {
155− to: "minimized"
156− PropertyAction { target: d; properties: "rowOffset" }
157− PropertyAnimation { target: flickable; properties: "contentX"; duration: 1000; easing: UbuntuAnimation.StandardEasing }
158− PropertyAnimation { target: row; properties: "anchors.rightMargin"; duration: 1000; easing: UbuntuAnimation.StandardEasing }
159− }
160− ]
161158}