packages/odo-on-swipe/dist/odo-on-swipe.js
function OnSwipe(element, fn) {
      var axis = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : OdoPointer.Axis.X;
      classCallCheck(this, OnSwipe);

      this.fn = fn;

      this.pointer = new OdoPointer(element, {
        axis: axis
      });

      this._onEnd = this._handlePointerEnd.bind(this);

      this.pointer.on(OdoPointer.EventType.END, this._onEnd);
    }
function OnSwipe(element, fn) {
      var axis = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : OdoPointer.Axis.X;
      classCallCheck(this, OnSwipe);

      this.fn = fn;

      this.pointer = new OdoPointer(element, {
        axis: axis
      });

      this._onEnd = this._handlePointerEnd.bind(this);

      this.pointer.on(OdoPointer.EventType.END, this._onEnd);
    }
function OnSwipe ( element , fn ) { var axis = arguments . length > 2 && arguments [ 2 ] !== undefined ? arguments [ 2 ] : OdoPointer . Axis . X ; classCallCheck ( this , OnSwipe ) ; this . fn = fn ; this . pointer = new OdoPointer ( element , { axis : axis } ) ; this . _onEnd = this . _handlePointerEnd . bind ( this ) ; this . pointer . on ( OdoPointer . EventType . END , this . _onEnd ) ; }
Provides a callback for swipe events.
@param {Element} element Element to watch for swipes.
@param {function(PointerEvent)} fn Callback when swiped.
@param {OdoPointer.Axis} [axis] Optional axis. Defaults to 'x'.
@constructor
Provides a callback for swipe events .