Skip to content

Commit

Permalink
Add shadowPane option to Marker
Browse files Browse the repository at this point in the history
Add shadowPane option to Marker, so developers can specify pane for marker's shadow as suggested in Leaflet#6447
  • Loading branch information
alexfig committed Jan 4, 2019
1 parent b2dd61d commit e0e03ca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/layer/marker/Marker.js
Expand Up @@ -63,6 +63,10 @@ export var Marker = Layer.extend({
// @option pane: String = 'markerPane'
// `Map pane` where the markers icon will be added.
pane: 'markerPane',

// @option pane: String = 'shadowPane'
// `Map pane` where the markers shadow will be added.
shadowPane: 'shadowPane',

// @option bubblingMouseEvents: Boolean = false
// When `true`, a mouse event on this marker will trigger the same event on the map
Expand Down Expand Up @@ -251,7 +255,7 @@ export var Marker = Layer.extend({
}
this._initInteraction();
if (newShadow && addShadow) {
this.getPane('shadowPane').appendChild(this._shadow);
this.getPane(options.shadowPane).appendChild(this._shadow);
}
},

Expand Down

0 comments on commit e0e03ca

Please sign in to comment.