View Full Version : catch tap event into a panel

11 Feb 2012, 8:17 AM

I have a panel that contains a carousel of several cards (panel themselves).
I'd like to add a listener to the tap event to the main panel so that if a user swipes it scroll the carousel left or right, if he taps an overlay is displayed.

I tried to add a controller that response to a panel but I can't find any touch event in the controller action.

i need some directions on how to achieve this task....

thanks for the help.


12 Feb 2012, 1:39 AM
this is the error i get from the designer

CodeGeneration: encountered an event binding with name "tap" which is not supported by its parent of type "panel".

12 Feb 2012, 2:04 AM
this is the code after having manually edited...

Ext.define('MyApp.controller.MyController', {
extend: 'Ext.app.Controller',

config: {
refs: {
keynote2: 'Keynote2'

control: {
keynote2: {
tap: 'onPanelTap'

onPanelTap: function(button, e, options) {


where 'Keynote2' is the ItemId and Id of a panel

nothing happens in the page once tapping on the panel...