src/main/javascript/gesture/floatz.gesture.touchzone.js
/**
	 * Swipe right handler.
	 *
	 * @param {Function} handler Swipe handler
	 * @returns {TouchZone} Touchzone object for chaining
	 */
Swipe right handler.
@param {Function} handler Swipe handler
@returns {TouchZone} Touchzone object for chaining
Swipe right handler . @param { Function } handler Swipe handler @returns { TouchZone } Touchzone object for chaining
onSwipeRight(handler) {
		this._handlers.push(() => {
			if (this.touchEndX() >= this.touchStartX()) {
				let movedX = this.touchEndX() - this.touchStartX();
				let movedY = this.touchEndY() - this.touchStartY();
				if(movedY < 0) {
					movedY = movedY * -1;
				}
				if (movedX > this._options.thresholdX && movedX > movedY) {
					handler(this);
				}
			}
		});
		return this;
	}
onSwipeRight ( handler ) { this . _handlers . push ( ( ) => { if ( this . touchEndX ( ) >= this . touchStartX ( ) ) { let movedX = this . touchEndX ( ) - this . touchStartX ( ) ; let movedY = this . touchEndY ( ) - this . touchStartY ( ) ; if ( movedY < 0 ) { movedY = movedY * - 1 ; } if ( movedX > this . _options . thresholdX && movedX > movedY ) { handler ( this ) ; } } } ) ; return this ; }
Swipe right handler.
Swipe right handler .