-
14 Nov 2012 9:47 AM #1
Answered: Container Doubletap Issue
Answered: Container Doubletap Issue
I have a container that houses all other components in my application. I want to detect 'doubletap' events on that container so I know if the user performs a 'doubletap' at any time during application use. How can I accomplish this? I have already tried adding a listener in the item definition, as well as using the 'on' method. (I could also switch the container for a panel if it works better). The documentation shows it being done with a single 'tap' here: http://docs.sencha.com/touch/2-0/#!/...anel-method-on. Thanks in advance.
-
Best Answer Posted by mitchellsimoens
The Panel doesn't have a tap or doubletap but the element does. Here is how you can listen to it in the two different ways:
andCode:initialize : function() { this.element.on('doubletap', 'onElDoubleTap', this); }, onElDoubleTap : function(e, t) {}
Code:listeners : { element : 'element', doubletap : function(e, t) {} }
-
16 Nov 2012 9:03 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,634
- Vote Rating
- 435
- Answers
- 3106
The Panel doesn't have a tap or doubletap but the element does. Here is how you can listen to it in the two different ways:
andCode:initialize : function() { this.element.on('doubletap', 'onElDoubleTap', this); }, onElDoubleTap : function(e, t) {}
Code:listeners : { element : 'element', doubletap : function(e, t) {} }Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
16 Nov 2012 11:08 AM #3
I've been searching for so long, and this is just what I need! Thanks for the help Mitchell!


Reply With Quote