From 3e8ddd19664b505a6ab4c9dd8b7c8e554ccc34b7 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 3 Jul 2017 21:43:52 -0700 Subject: [PATCH] Add jsdoc --- src/Viewport.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Viewport.ts b/src/Viewport.ts index 6d4c1c845..5be6bffdf 100644 --- a/src/Viewport.ts +++ b/src/Viewport.ts @@ -123,10 +123,18 @@ export class Viewport { ev.preventDefault(); }; + /** + * Handles the touchstart event, recording the touch occurred. + * @param ev The touch event. + */ public onTouchStart(ev: TouchEvent) { this.lastTouchY = ev.touches[0].pageY; }; + /** + * Handles the touchmove event, scrolling the viewport if the position shifted. + * @param ev The touch event. + */ public onTouchMove(ev: TouchEvent) { let deltaY = this.lastTouchY - ev.touches[0].pageY; this.lastTouchY = ev.touches[0].pageY;