code: function(type, mode, args) {
          var key = this.EVENTMAP[type][mode];
          if(key) {
              if(type == 'click' && this.up && this.down) {
                  // for click/clickout, only trigger callback if tolerance is met
                  var dpx = Math.sqrt(
                      Math.pow(this.up.x - this.down.x, 2) +
                      Math.pow(this.up.y - this.down.y, 2)
                  );
                  if(dpx <= this.clickTolerance) {
                      this.callback(key, args);
                  }
                  // we're done with this set of events now: clear the cached
                  // positions so we can't trip over them later (this can occur
                  // if one of the up/down events gets eaten before it gets to us
                  // but we still get the click)
                  this.up = this.down = null;
              } else {
                  this.callback(key, args);
              }
          }
      }
docs: Method: triggerCallback
  Call the callback keyed in the event map with the supplied arguments.
  For click and clickout, the <clickTolerance> is checked first.
  
  Parameters:
  type - {String}