Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

touchend时,是不是应该用changedTouches访问当前触摸点对象 #104

Open
narol1024 opened this issue Mar 18, 2018 · 3 comments
Open

Comments

@narol1024
Copy link

narol1024 commented Mar 18, 2018

if (evt.touches.length<2) {

貌似touchend触发后,只有event.changedTouches才能访问到触摸点对象,targetTouchestouches此时为空了。

另外为什么判断length < 2时才触发onMultipointEnd,不解,或者说,怎么样判断是单点触发end还是多点触发end事件?

@narol1024 narol1024 changed the title touchend时,是不是应该用changeTouches访问当前触摸点对象 touchend时,是不是应该用changedTouches访问当前触摸点对象 Mar 18, 2018
@dntzhang
Copy link

touches 可以访问到还遗留在屏幕上的 触点啊~~

@narol1024
Copy link
Author

narol1024 commented Mar 19, 2018

假设是多触摸点的话,同时松开,那么touches在touchend应该为空了,changedTouches则不会

@narol1024
Copy link
Author

narol1024 commented Mar 19, 2018

现在比较尴尬的事,单点触摸也会触发multipointEnd事件,同这个issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants