lib/classes/button-mgr.js
function(time) {
    var self = this;
    self.eventDetection.recordRelease(time);

    if (self.eventDetection.isLongPress()) {
      // this is a "long-press" -  reset detection states and notify the "long-press" observers
      self.eventDetection.reset();
      self._notifyObservers(self.onLongPressCallbackRegistry);
    } else {
      if (self.eventDetection.onReleaseCount >= 2) {
        // this is a double-press (or more) event, so notify the "double-press" observers
        self.eventDetection.reset();
        self._notifyObservers(self.onDoublePressCallbackRegistry);
      }

      setTimeout(function(){
        if (self.eventDetection.onReleaseCount == 1) {
          // second press did not occur within the allotted time, so notify the "short-press" observers
          self.eventDetection.reset();
          self._notifyObservers(self.onShortPressCallbackRegistry);
        }
      }, 300); // @-@:p0 make this configurable?
    }
  }
function(time) {
    var self = this;
    self.eventDetection.recordRelease(time);

    if (self.eventDetection.isLongPress()) {
      // this is a "long-press" -  reset detection states and notify the "long-press" observers
      self.eventDetection.reset();
      self._notifyObservers(self.onLongPressCallbackRegistry);
    } else {
      if (self.eventDetection.onReleaseCount >= 2) {
        // this is a double-press (or more) event, so notify the "double-press" observers
        self.eventDetection.reset();
        self._notifyObservers(self.onDoublePressCallbackRegistry);
      }

      setTimeout(function(){
        if (self.eventDetection.onReleaseCount == 1) {
          // second press did not occur within the allotted time, so notify the "short-press" observers
          self.eventDetection.reset();
          self._notifyObservers(self.onShortPressCallbackRegistry);
        }
      }, 300); // @-@:p0 make this configurable?
    }
  }
function ( time ) { var self = this ; self . eventDetection . recordRelease ( time ) ; if ( self . eventDetection . isLongPress ( ) ) { // this is a "long-press" -  reset detection states and notify the "long-press" observers self . eventDetection . reset ( ) ; self . _notifyObservers ( self . onLongPressCallbackRegistry ) ; } else { if ( self . eventDetection . onReleaseCount >= 2 ) { // this is a double-press (or more) event, so notify the "double-press" observers self . eventDetection . reset ( ) ; self . _notifyObservers ( self . onDoublePressCallbackRegistry ) ; } setTimeout ( function ( ) { if ( self . eventDetection . onReleaseCount == 1 ) { // second press did not occur within the allotted time, so notify the "short-press" observers self . eventDetection . reset ( ) ; self . _notifyObservers ( self . onShortPressCallbackRegistry ) ; } } , 300 ) ; // @-@:p0 make this configurable? } }
Handle the button-release event generated by the button associated with this ButtonMgr instance.

@param time the time of the button-up event.
Handle the button - release event generated by the button associated with this ButtonMgr instance .