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

multiple handlers #18

Closed
machineroom opened this issue Jul 6, 2012 · 4 comments
Closed

multiple handlers #18

machineroom opened this issue Jul 6, 2012 · 4 comments

Comments

@machineroom
Copy link

Hi, great library!
Just upgraded to 1.3.1. In previous versions (1.2.5 for example) it was possible to register multiple handlers on the same object (e.g. $document) to receive 1 and 2 finger gestures. Somewhere between 1.2.5 & 1.3.1 this seems to have been dropped, or am I missing something?

Thanks

@mattbryson
Copy link
Owner

The event model within the plugin was re-written with 1.3, so clearly something has broken there.

Would it be useful if you could register for both 1 and 2 finger swipes? The number of fingers then being reported in the event object? Then you could use just one instance for both.

Either way, ill look at what changed, but I won't be able to look into it for the next week, but ill see if I can sort it when im back.

Cheers

m.

@machineroom
Copy link
Author

Hi Matt. Exposing the number of fingers to the event object would be ideal. It would also allow future expansion to 3, 4?! fingers.

Cheers
James

@mattbryson
Copy link
Owner

Hi James,

Sorry for the delay, been pretty busy recently!

Ive added the value "all" to the fingers property. If this is set, then ANY combination of fingers triggers a swipe.
And now, all event handlers have the finger count passed to them. This means you can use the swipe handler to capture 1,2,3 finger swipes. See http://labs.skinkers.com/touchSwipe/demo/3-1_Any_finger_swipe.php for an example.

Cheers

m.

@machineroom
Copy link
Author

Works well, thank you!

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