calculate current touch position on click (fixes #28) (#178)

This commit is contained in:
David Heidrich 2016-06-24 15:34:40 +02:00 committed by Ivan Starkov
parent 65c2250e6a
commit 2170819237

View File

@ -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_) {