代码之家  ›  专栏  ›  技术社区  ›  ThinkAndCode

React-Native:合成触摸事件locationX和pageX之间的区别是什么

  •  0
  • ThinkAndCode  · 技术社区  · 6 年前

    什么时候 View 被触摸,位置 可以通过使用 Synthetic Touch Events 。根据 Documentation ,

    locationX - The X position of the touch, relative to the element.
    
    pageX - The X position of the touch, relative to the root element.
    

    在触摸页面的页面上方。

    所以,哪个更好 locationX pageX

    0 回复  |  直到 6 年前
    推荐文章