Closed fritz-c closed 8 years ago
LGTM. Have you signed the CLA?
Yes, I have. The email (gmail) is a secondary email on this account, however. Would that be an issue?
Nope, that's OK.
This breaks (i.e. it disables) zoomOnClick functionality on Chrome, possibly due to a Chrome bug which inserts a mousemove after mousedown before click -- https://bugs.chromium.org/p/chromium/issues/detail?id=161464
I'm currently using Chrome version 57.0.2987.133 on Windows 10 version 1607 (64-bit).
IMO you can fix this by changing the new mousemove handler to ...
google.maps.event.addDomListener(this.div_, 'mousemove', function(event) {
if (event.movementX || event.movementY) {
isDragging = true;
}
});
... so that it doesn't set isDragging
if the movementX
and movementY
of the mousemove event are both zero.
When markers are occupying a large portion of the clickable area of the map, it can be frustrating to try to pan about the map and accidentally trigger unwanted click events.
The default behavior for Google Maps markers, presumably in response to this issue, appears to be as follows: When a drag event occurs between the mousedown and mouseup of a click, the click event is not called.
Here's with the InfoWindow sample code for example:
js-marker-clusterer, before
However, js-marker-clusterer, by changing the markers to an overlay, loses this behavior:
js-marker-clusterer, after
This pull request restores the behavior of the markers, as in: