Skip to content

Commit

Permalink
enable cluster custom zindex setting
Browse files Browse the repository at this point in the history
  • Loading branch information
asad-mlbd authored Dec 12, 2018
1 parent 7d5142d commit 3d1842e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/markerclusterer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,12 @@ ClusterIcon.prototype.useStyle = function() {
} else if(this.cluster_.isBuzzed) { /* cluster url hack for buzzed cluster */
this.url_ = style['url'].replace(/balloon\./, 'buzzed-balloon.');
}

/* Cluster zIndex hack */
if(style['zIndex']) {
this.zIndex_ = style['zIndex'];
}

};


Expand All @@ -1241,6 +1247,10 @@ ClusterIcon.prototype.createCss = function(pos) {
style.push('background-image:url(' + this.url_ + ');');
var backgroundPosition = this.backgroundPosition_ ? this.backgroundPosition_ : '0 0';
style.push('background-position:' + backgroundPosition + ';');

if(this.zIndex_) {
style.push('z-index:' + this.zIndex_ + ';');
}

if (typeof this.anchor_ === 'object') {
if (typeof this.anchor_[0] === 'number' && this.anchor_[0] > 0 &&
Expand Down

0 comments on commit 3d1842e

Please sign in to comment.