Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Apr 2010
    Posts
    107
    Vote Rating
    -1
    merrells is an unknown quantity at this point

      0  

    Default tap if not a doubletap

    tap if not a doubletap


    I want tap to do one thing and doubletap another thing. If I catch both, with on(...), then I get a tap, and then a bit later a doubletap, which causes a bit of confusion. Is there a way, in the framework, to ask for a tap _or_ a doubletap instead of both? If not, then how would I go about implementing that..... catch the tap... start a timer to run the tap code when it expires... and then if a doubletap comes in then it aborts the timer and runs the doubletap code. Looks like the default maximum time between taps for a doubletap is 800ms.... hmm quite long... anyone else been here before?

    John

  2. #2
    Sencha User
    Join Date
    Apr 2010
    Posts
    107
    Vote Rating
    -1
    merrells is an unknown quantity at this point

      0  

    Default


    Answering my own question....


    afterRender: function() {
    XXX.superclass.afterRender.call(this);
    this.getEl().on('tap',this.onTapOrDoubleTap,this);
    },

    doubleTapThreshold: 500,

    onTapOrDoubleTap: function(e,t) {
    if (this.tapStartTime && e.time-this.tapStartTime<this.doubleTapThreshold) {
    clearTimeout(this.timer)
    this.onDoubleTap(e,t);
    } else {
    this.tapStartTime = new Date();
    this.timer= Ext.defer(this.onTap,this.doubleTapThreshold,this,[e,t]);
    }
    },

Similar Threads

  1. Tap, doubletap & taphold on one component
    By tobinharris in forum Sencha Touch 1.x: Discussion
    Replies: 9
    Last Post: 13 Jun 2014, 5:53 AM
  2. Adding a tap or double tap on carousel/panel
    By vijayrao in forum Sencha Touch 1.x: Discussion
    Replies: 5
    Last Post: 18 Apr 2012, 5:59 AM
  3. Doubletap on panel
    By freshface in forum Sencha Touch 1.x: Discussion
    Replies: 3
    Last Post: 29 Aug 2010, 10:26 PM
  4. Tap and Doubletap on List object
    By stefx in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 23 Aug 2010, 1:20 AM
  5. With the doubletap, will tap always be called, or is that a bug?
    By rdougan in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 6 Aug 2010, 9:55 PM