@@ -118,26 +118,26 @@ SwipeArea {
121− function limitMovement(inputStep) {
121+ function limitMovement(distance) {
122− var targetValue = MathUtils.clamp(dragParent[targetProp] + inputStep, minValue, maxValue);
122+ var targetValue = MathUtils.clamp(d.startValue + distance, minValue, maxValue);
123− var step = targetValue - dragParent[targetProp];
123+ var diff = targetValue - d.startValue;
125 if (hintDisplacement == 0) {
125 if (hintDisplacement == 0) {
126− return step;
126+ return diff;
129 // we should not go behind hintingAnimation's current value
129 // we should not go behind hintingAnimation's current value
130 if (Direction.isPositive(direction)) {
130 if (Direction.isPositive(direction)) {
131− if (dragParent[targetProp] + step < hintingAnimation.targetValue) {
131+ if (d.startValue + diff < hintingAnimation.targetValue) {
132− step = hintingAnimation.targetValue - dragParent[targetProp];
132+ diff = hintingAnimation.targetValue - d.startValue;
135− if (dragParent[targetProp] + step > hintingAnimation.targetValue) {
135+ if (d.startValue + diff > hintingAnimation.targetValue) {
136− step = hintingAnimation.targetValue - dragParent[targetProp];
136+ diff = hintingAnimation.targetValue - d.startValue;
140− return step;
140+ return diff;
143 function onFinishedRecognizedGesture() {
143 function onFinishedRecognizedGesture() {
@@ -179,11 +179,8 @@ SwipeArea {
179 onDistanceChanged: {
179 onDistanceChanged: {
180 if (dragging) {
180 if (dragging) {
181 // don't go the whole distance in order to smooth out the movement
181 // don't go the whole distance in order to smooth out the movement
182− var step = distance * 0.3;
184− step = d.limitMovement(step);
182+ var toAdd = d.limitMovement(distance);
186− parent[d.targetProp] += step;
183+ parent[d.targetProp] = d.startValue + toAdd;