src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js
function(mOptions, oEvent) {
			if (oEvent.type !== "touchmove" && oEvent.pointerType !== "touch") {
				return;
			}

			var oScrollExtension = this._getScrollExtension();
			var mTouchSessionData = internal(this).mTouchSessionData;

			if (!mTouchSessionData) {
				return;
			}

			var oTouchObject = oEvent.touches ? oEvent.touches[0] : oEvent;
			var iTouchDistanceX = (oTouchObject.pageX - mTouchSessionData.initialPageX);
			var iTouchDistanceY = (oTouchObject.pageY - mTouchSessionData.initialPageY);
			var bScrollingPerformed = false;

			if (!mTouchSessionData.touchMoveDirection) {
				if (iTouchDistanceX === 0 && iTouchDistanceY === 0) {
					return;
				}
				mTouchSessionData.touchMoveDirection = Math.abs(iTouchDistanceX) > Math.abs(iTouchDistanceY) ? "horizontal" : "vertical";
			}

			switch (mTouchSessionData.touchMoveDirection) {
				case "horizontal":
					var oHSb = oScrollExtension.getHorizontalScrollbar();

					if (oHSb && (mOptions.scrollDirection === ScrollDirection.HORIZONAL
								 || mOptions.scrollDirection === ScrollDirection.BOTH)) {
						this._getKeyboardExtension().setActionMode(false);

						if (mTouchSessionData.initialScrolledToEnd == null) {
							if (iTouchDistanceX < 0) { // Scrolling to the right.
								mTouchSessionData.initialScrolledToEnd = oHSb.scrollLeft === oHSb.scrollWidth - oHSb.offsetWidth;
							} else { // Scrolling to the left.
								mTouchSessionData.initialScrolledToEnd = oHSb.scrollLeft === 0;
							}
						}

						if (!mTouchSessionData.initialScrolledToEnd) {
							oHSb.scrollLeft = mTouchSessionData.initialScrollLeft - iTouchDistanceX;
							bScrollingPerformed = true;
						}
					}
					break;

				case "vertical":
					var oVSb = oScrollExtension.getVerticalScrollbar();

					if (oVSb && (mOptions.scrollDirection === ScrollDirection.VERTICAL
								 || mOptions.scrollDirection === ScrollDirection.BOTH)) {
						this._getKeyboardExtension().setActionMode(false);

						if (mTouchSessionData.initialScrolledToEnd == null) {
							if (iTouchDistanceY < 0) { // Scrolling down.
								mTouchSessionData.initialScrolledToEnd = oVSb.scrollTop === oVSb.scrollHeight - oVSb.offsetHeight;
							} else { // Scrolling up.
								mTouchSessionData.initialScrolledToEnd = oVSb.scrollTop === 0;
							}
						}

						if (!mTouchSessionData.initialScrolledToEnd) {
							VerticalScrollingHelper.updateScrollPosition(this, mTouchSessionData.initialScrollTop - iTouchDistanceY,
								ScrollTrigger.TOUCH);
							bScrollingPerformed = true;
						}
					}
					break;
				default:
			}

			if (bScrollingPerformed) {
				oEvent.preventDefault();
			}
		}
function(mOptions, oEvent) {
			if (oEvent.type !== "touchmove" && oEvent.pointerType !== "touch") {
				return;
			}

			var oScrollExtension = this._getScrollExtension();
			var mTouchSessionData = internal(this).mTouchSessionData;

			if (!mTouchSessionData) {
				return;
			}

			var oTouchObject = oEvent.touches ? oEvent.touches[0] : oEvent;
			var iTouchDistanceX = (oTouchObject.pageX - mTouchSessionData.initialPageX);
			var iTouchDistanceY = (oTouchObject.pageY - mTouchSessionData.initialPageY);
			var bScrollingPerformed = false;

			if (!mTouchSessionData.touchMoveDirection) {
				if (iTouchDistanceX === 0 && iTouchDistanceY === 0) {
					return;
				}
				mTouchSessionData.touchMoveDirection = Math.abs(iTouchDistanceX) > Math.abs(iTouchDistanceY) ? "horizontal" : "vertical";
			}

			switch (mTouchSessionData.touchMoveDirection) {
				case "horizontal":
					var oHSb = oScrollExtension.getHorizontalScrollbar();

					if (oHSb && (mOptions.scrollDirection === ScrollDirection.HORIZONAL
								 || mOptions.scrollDirection === ScrollDirection.BOTH)) {
						this._getKeyboardExtension().setActionMode(false);

						if (mTouchSessionData.initialScrolledToEnd == null) {
							if (iTouchDistanceX < 0) { // Scrolling to the right.
								mTouchSessionData.initialScrolledToEnd = oHSb.scrollLeft === oHSb.scrollWidth - oHSb.offsetWidth;
							} else { // Scrolling to the left.
								mTouchSessionData.initialScrolledToEnd = oHSb.scrollLeft === 0;
							}
						}

						if (!mTouchSessionData.initialScrolledToEnd) {
							oHSb.scrollLeft = mTouchSessionData.initialScrollLeft - iTouchDistanceX;
							bScrollingPerformed = true;
						}
					}
					break;

				case "vertical":
					var oVSb = oScrollExtension.getVerticalScrollbar();

					if (oVSb && (mOptions.scrollDirection === ScrollDirection.VERTICAL
								 || mOptions.scrollDirection === ScrollDirection.BOTH)) {
						this._getKeyboardExtension().setActionMode(false);

						if (mTouchSessionData.initialScrolledToEnd == null) {
							if (iTouchDistanceY < 0) { // Scrolling down.
								mTouchSessionData.initialScrolledToEnd = oVSb.scrollTop === oVSb.scrollHeight - oVSb.offsetHeight;
							} else { // Scrolling up.
								mTouchSessionData.initialScrolledToEnd = oVSb.scrollTop === 0;
							}
						}

						if (!mTouchSessionData.initialScrolledToEnd) {
							VerticalScrollingHelper.updateScrollPosition(this, mTouchSessionData.initialScrollTop - iTouchDistanceY,
								ScrollTrigger.TOUCH);
							bScrollingPerformed = true;
						}
					}
					break;
				default:
			}

			if (bScrollingPerformed) {
				oEvent.preventDefault();
			}
		}
function ( mOptions , oEvent ) { if ( oEvent . type !== "touchmove" && oEvent . pointerType !== "touch" ) { return ; } var oScrollExtension = this . _getScrollExtension ( ) ; var mTouchSessionData = internal ( this ) . mTouchSessionData ; if ( ! mTouchSessionData ) { return ; } var oTouchObject = oEvent . touches ? oEvent . touches [ 0 ] : oEvent ; var iTouchDistanceX = ( oTouchObject . pageX - mTouchSessionData . initialPageX ) ; var iTouchDistanceY = ( oTouchObject . pageY - mTouchSessionData . initialPageY ) ; var bScrollingPerformed = false ; if ( ! mTouchSessionData . touchMoveDirection ) { if ( iTouchDistanceX === 0 && iTouchDistanceY === 0 ) { return ; } mTouchSessionData . touchMoveDirection = Math . abs ( iTouchDistanceX ) > Math . abs ( iTouchDistanceY ) ? "horizontal" : "vertical" ; } switch ( mTouchSessionData . touchMoveDirection ) { case "horizontal" : var oHSb = oScrollExtension . getHorizontalScrollbar ( ) ; if ( oHSb && ( mOptions . scrollDirection === ScrollDirection . HORIZONAL || mOptions . scrollDirection === ScrollDirection . BOTH ) ) { this . _getKeyboardExtension ( ) . setActionMode ( false ) ; if ( mTouchSessionData . initialScrolledToEnd == null ) { if ( iTouchDistanceX < 0 ) { // Scrolling to the right. mTouchSessionData . initialScrolledToEnd = oHSb . scrollLeft === oHSb . scrollWidth - oHSb . offsetWidth ; } else { // Scrolling to the left. mTouchSessionData . initialScrolledToEnd = oHSb . scrollLeft === 0 ; } } if ( ! mTouchSessionData . initialScrolledToEnd ) { oHSb . scrollLeft = mTouchSessionData . initialScrollLeft - iTouchDistanceX ; bScrollingPerformed = true ; } } break ; case "vertical" : var oVSb = oScrollExtension . getVerticalScrollbar ( ) ; if ( oVSb && ( mOptions . scrollDirection === ScrollDirection . VERTICAL || mOptions . scrollDirection === ScrollDirection . BOTH ) ) { this . _getKeyboardExtension ( ) . setActionMode ( false ) ; if ( mTouchSessionData . initialScrolledToEnd == null ) { if ( iTouchDistanceY < 0 ) { // Scrolling down. mTouchSessionData . initialScrolledToEnd = oVSb . scrollTop === oVSb . scrollHeight - oVSb . offsetHeight ; } else { // Scrolling up. mTouchSessionData . initialScrolledToEnd = oVSb . scrollTop === 0 ; } } if ( ! mTouchSessionData . initialScrolledToEnd ) { VerticalScrollingHelper . updateScrollPosition ( this , mTouchSessionData . initialScrollTop - iTouchDistanceY , ScrollTrigger . TOUCH ) ; bScrollingPerformed = true ; } } break ; default : } if ( bScrollingPerformed ) { oEvent . preventDefault ( ) ; } }
Handles touch move events.

@param {TableScrollExtension.EventListenerOptions} mOptions The options.
@param {jQuery.Event} oEvent The touch or pointer event object.
Handles touch move events .