1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    20
    Vote Rating
    0
    bassajen is on a distinguished road

      0  

    Default catch tap event into a panel

    catch tap event into a panel


    hello,

    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.

    Marco

  2. #2
    Sencha User
    Join Date
    Oct 2011
    Posts
    20
    Vote Rating
    0
    bassajen is on a distinguished road

      0  

    Default error from designer

    error from designer


    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".

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    20
    Vote Rating
    0
    bassajen is on a distinguished road

      0  

    Default


    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) {
    Ext.Msg.alert('tap');
    }


    });

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

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