Sign in to follow this  
lars

disable multitouch

Recommended Posts

Right now, when i want to "disable multitouch" I do the following:

this.mouseCounter = 0:

On a pointerDown event:

this.mouseCounter++;

if(this.mouseCounter < 2 ){

doSomeThing

}

On a pointerUp event:

this.mouseCounter = 0;

Simply q 🙂 Is there a better way to do this.

Share this post


Link to post
Share on other sites

When a touch/pointer begins, store the pointerId of the first touch and keep track of that and only react to events with that id. When event ends, make it null and allow storing of next touch/point.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.