2
我使用TouchSwipe(http://labs.skinkers.com/touchSwipe/)。我的問題是swipeStatus事件回調中的距離是兩點之間的距離(開始拖動點和當前拖動點)。我只想要分別獲得x距離或y距離。那是怎麼回事?TouchSwipe返回距離X
swipeStatus: function(event, phase, direction, distance)
我使用TouchSwipe(http://labs.skinkers.com/touchSwipe/)。我的問題是swipeStatus事件回調中的距離是兩點之間的距離(開始拖動點和當前拖動點)。我只想要分別獲得x距離或y距離。那是怎麼回事?TouchSwipe返回距離X
swipeStatus: function(event, phase, direction, distance)
您可以從事件參數獲取x和y座標。對於刷卡,即:
event.pageX
event.pageY
快樂編碼!
由於某些原因,當我登錄event.pageX它總是返回0.任何想法? – Rich