From 2e7dc00b2617b2714465ea1c62caa83e296aabf8 Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Tue, 18 Jul 2017 11:06:30 -0700 Subject: [PATCH] [ci skip] fix closure warning --- lib/utils/gestures.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/utils/gestures.html b/lib/utils/gestures.html index 85677dad4d..7ccc4ad6d8 100644 --- a/lib/utils/gestures.html +++ b/lib/utils/gestures.html @@ -913,14 +913,14 @@ }, /** * @this {GestureRecognizer} - * @param {Event} e - * @param {Function} preventer + * @param {Event | Touch} e + * @param {Event=} preventer */ forward: function(e, preventer) { let dx = Math.abs(e.clientX - this.info.x); let dy = Math.abs(e.clientY - this.info.y); // find original target from `preventer` for TouchEvents, or `e` for MouseEvents - let t = Gestures._findOriginalTarget(preventer || e); + let t = Gestures._findOriginalTarget(/** @type {Event} */(preventer || e)); // dx,dy can be NaN if `click` has been simulated and there was no `down` for `start` if (isNaN(dx) || isNaN(dy) || (dx <= TAP_DISTANCE && dy <= TAP_DISTANCE) || isSyntheticClick(e)) { // prevent taps from being generated if an event has canceled them