Skip to content

Commit

Permalink
prevent cluster click event bubble
Browse files Browse the repository at this point in the history
  • Loading branch information
sodik82 committed Jul 21, 2015
1 parent 89b08d0 commit a6ce478
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
7 changes: 5 additions & 2 deletions src/markerclusterer.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// ==ClosureCompiler==
// @compilation_level ADVANCED_OPTIMIZATIONS
// @externs_url http://closure-compiler.googlecode.com/svn/trunk/contrib/externs/maps/google_maps_api_v3_3.js
// @externs_url https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/maps/google_maps_api_v3_20.js
// ==/ClosureCompiler==

// forked by @sodik82

/**
* @name MarkerClusterer for Google Maps v3
* @version version 1.0
Expand Down Expand Up @@ -1071,8 +1073,9 @@ ClusterIcon.prototype.onAdd = function() {
panes.overlayMouseTarget.appendChild(this.div_);

var that = this;
google.maps.event.addDomListener(this.div_, 'click', function() {
google.maps.event.addDomListener(this.div_, 'click', function(e) {
that.triggerClusterClick();
e.cancelBubble = true;
});
};

Expand Down
41 changes: 20 additions & 21 deletions src/markerclusterer_compiled.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a6ce478

Please sign in to comment.