function (element, options) {
      var self = this;
      element[0].$mdGesture = element[0].$mdGesture || {};
      element[0].$mdGesture[this.name] = options || {};
      element.on('$destroy', onDestroy);

      self.onSetup(element, options || {});

      return onDestroy;

      function onDestroy() {
        delete element[0].$mdGesture[self.name];
        element.off('$destroy', onDestroy);

        self.onCleanup(element, options || {});
      }
    }
function (element, options) {
      var self = this;
      element[0].$mdGesture = element[0].$mdGesture || {};
      element[0].$mdGesture[this.name] = options || {};
      element.on('$destroy', onDestroy);

      self.onSetup(element, options || {});

      return onDestroy;

      function onDestroy() {
        delete element[0].$mdGesture[self.name];
        element.off('$destroy', onDestroy);

        self.onCleanup(element, options || {});
      }
    }
function ( element , options ) { var self = this ; element [ 0 ] . $mdGesture = element [ 0 ] . $mdGesture || { } ; element [ 0 ] . $mdGesture [ this . name ] = options || { } ; element . on ( '$destroy' , onDestroy ) ; self . onSetup ( element , options || { } ) ; return onDestroy ; function onDestroy ( ) { delete element [ 0 ] . $mdGesture [ self . name ] ; element . off ( '$destroy' , onDestroy ) ; self . onCleanup ( element , options || { } ) ; } }
Called from $mdGesture.register when an element registers itself with a handler. Store the options the user gave on the DOMElement itself. These options will be retrieved with getNearestParent when the handler starts.
Called from $mdGesture . register when an element registers itself with a handler . Store the options the user gave on the DOMElement itself . These options will be retrieved with getNearestParent when the handler starts .
Initialize the gesture