From 2170819237e02ba0e52f807cd8d0f1892ea72a34 Mon Sep 17 00:00:00 2001 From: David Heidrich Date: Fri, 24 Jun 2016 15:34:40 +0200 Subject: [PATCH] calculate current touch position on click (fixes #28) (#178) --- src/google_map.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/google_map.js b/src/google_map.js index 23c9798..1104150 100644 --- a/src/google_map.js +++ b/src/google_map.js @@ -725,6 +725,8 @@ export default class GoogleMap extends Component { _onMapClick = (event) => { if (this.markersDispatcher_) { + // support touch events and recalculate mouse position on click + this._onMapMouseMove(event); const currTime = (new Date()).getTime(); if (currTime - this.dragTime_ > K_IDLE_TIMEOUT) { if (this.mouse_) {