touch事宜小结

原文:http://zhuxinyong.com/2016/03/08/touch%E4%BA%8B%E4%BB%B6%E5%B0%8F%E7%BB%93/
现在支撑优越的三种触摸事宜:1. touchstart 2. touchmove 3. touchend。

ToucheEvent -> TouchList -> Touch
触摸事宜属性(TouchEvent):
Represents an event that occurs when the state of touches on the surface changes.

触摸事宜列表(TouchList):

Represents a group of touches; this is used when the user has, for example, multiple fingers on the surface at the same time.

  • touches 当前位于屏幕上的一切手指行动的列表。

  • targetTouches 位于当前 DOM 元素上的手指行动的列表

  • changedTouches 触及当前事宜的手指行动的列表。比方,在一个 touchend 事宜中,这将是移开手指
    触摸事宜(Touch):

Represents a single point of contact between the user and the touch surface.

位置信息:

  • clientX/Y

  • pageX/Y

  • screenX/y
    这些信息能够推断拖动的方向(下拉革新/上拉加载)。

    原文作者:Zhuxy
    原文地址: https://segmentfault.com/a/1190000004564864
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞