Results 1 to 3 of 3

Thread: Container Doubletap Issue

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    5
    Vote Rating
    0
      0  

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

  2. 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:

    Code:
    initialize : function() {
        this.element.on('doubletap', 'onElDoubleTap', this);
    },
    
    onElDoubleTap : function(e, t) {}
    and

    Code:
    listeners : {
        element : 'element',
        doubletap : function(e, t) {}
    }

  3. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Answers
    3976
    Vote Rating
    1381
      0  

    Default

    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:

    Code:
    initialize : function() {
        this.element.on('doubletap', 'onElDoubleTap', this);
    },
    
    onElDoubleTap : function(e, t) {}
    and

    Code:
    listeners : {
        element : 'element',
        doubletap : function(e, t) {}
    }
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    5
    Vote Rating
    0
      0  

    Default

    I've been searching for so long, and this is just what I need! Thanks for the help Mitchell!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •