+
+ // Note, we test both < and > situations here. We don't want to
+ // effect a change in direction if the user is only moving side
+ // to side with no Y position change.
+
+ // Detect changes in the position relative to the start point.
+ if (info.start[1] < info.xy[1]) {
+ // We are going up if our final position is higher than our start position.
+ this.absgoingup = true;
+
+ } else if (info.start[1] > info.xy[1]) {
+ // Otherwise we're going down.
+ this.absgoingup = false;
+ }
+
+ // Detect changes in the position relative to the last movement.
+ if (info.delta[1] < 0) {
+ // We are going up if our final position is higher than our start position.