-
16 Nov 2011 11:09 PM #1
Answered: Accessing default event swipe handler
Answered: Accessing default event swipe handler
Hi guys, I've got a carousel panel with html content loaded in, and I've set it up so on render, it has the el.on event of double tap
e.el.on("doubletap",functionx(e){});
Which works wonderfully, except that now the swipe is disabled for the panel. Any idea why or how to fix it so the doubletap stays in place but the default swipe events still apply?
Any help is much appreciated!
Cheers
-
Best Answer Posted by mitchellsimoens
This is working for me without interrupting the swipe event of the carousel:
Code:new Ext.Carousel({ fullscreen : true, items : [ { html : 'Hi' }, { html : 'Hello' } ], listeners : { afterrender: function(carousel) { carousel.el.on('doubletap', function() { console.log('doubletap on carousel') }); var items = carousel.query('panel'); items[0].el.on('doubletap', function() { console.log('doubletap on first') }); items[1].el.on('doubletap', function() { console.log('doubletap on second') }); } } });
-
17 Nov 2011 12:29 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,710
- Vote Rating
- 436
- Answers
- 3113
This is working for me without interrupting the swipe event of the carousel:
Code:new Ext.Carousel({ fullscreen : true, items : [ { html : 'Hi' }, { html : 'Hello' } ], listeners : { afterrender: function(carousel) { carousel.el.on('doubletap', function() { console.log('doubletap on carousel') }); var items = carousel.query('panel'); items[0].el.on('doubletap', function() { console.log('doubletap on first') }); items[1].el.on('doubletap', function() { console.log('doubletap on second') }); } } });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.
-
17 Nov 2011 8:54 PM #3


Reply With Quote
