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

error line 390 #2

Closed
xem opened this issue Feb 17, 2012 · 1 comment
Closed

error line 390 #2

xem opened this issue Feb 17, 2012 · 1 comment

Comments

@xem
Copy link

xem commented Feb 17, 2012

Hi,

on iPad, there is an error line 390 of touchy.js:

your code says:

this.fingers.splice(index, 1);

but this.fingers is undefined.

Instead, I wrote this:

mainHand.fingers.splice(index, 1);

and it solved the problem. But is it the right thing? And btw, why do you do a splice at this place?

Thanks for fixing this.

M.E.

@jairajs89
Copy link
Owner

Nice bug catch! It's fixed in my latest commit.

mainHand holds all the current fingers touching the screen. This function, 'mainHandEnd', is called when a finger from the mainHand is no longer touching the screen, so I remove it from mainHand.fingers (the list of fingers).

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