Skip to content
This repository has been archived by the owner on Jun 16, 2019. It is now read-only.

prevent event propagation #103

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/markerclusterer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,12 @@ ClusterIcon.prototype.onAdd = function() {
var that = this;
var isDragging = false;
google.maps.event.addDomListener(this.div_, 'click', function(event) {
// Prevent event propagation
event.cancelBubble = true;
if (event.stopPropagation){
event.stopPropagation();
}

// Only perform click when not preceded by a drag
if (!isDragging) {
that.triggerClusterClick(event);
Expand Down