2

我使用 TouchSwipe (http://labs.skinkers.com/touchSwipe/)。我的问题是 swipeStatus 事件回调中的距离是两点之间的距离(开始拖动点和当前拖动点)。我只想分别获得 x 距离或 y 距离。怎么做?

swipeStatus: function(event, phase, direction, distance)
4

1 回答 1

2

您可以从事件参数中获取 x 和 y 坐标。对于刷卡,即:

event.pageX
event.pageY

快乐编码!

于 2013-01-10T07:37:19.210 回答