You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
I am currently developing a multitouch application and tried to use ngTouch here. I stumbled upon an implementation which can handle only one touch at a time. I am wondering if this is done by purpose as i dont know about the side effects of my idea.
Right now ngTouch alters the ng-click directive, so it will work with touch events, but the implementation works with only one touch at a time.
Any OS, any Browser
Angular and ngTouch Version 1.2.17
If you hold one button, the other one will not work anymore, altough the touchstart and touchend events are triggered. I think this is due to 3 reasons:
The touchstart event handler on the element takes the first touch in the list of touches instead of the targetTouches. If there is another touch in progress it will take it as the touchstart coordinates which is wrong (at least semantically) since this is not the touch which occured.
The preventGhostClick function can only handle one event too.
The tapping property gets reset if any touch move event happens
In my case i am trying to use a 2D-Joystick which gets dragged around all the time. Additionally i want to trigger some other stuff like a horn. I looked for a solution to get this behavior, but had no success, the only thing left would be to attach the touch handlers manually.
I would be glad to provide a pull request if wished.
Note: Currently there is a problem if jQuery included, the starting coordinates are NaN for the touchstart. See #4583