Skip to content

Commit

Permalink
Add shadowPane option to Marker (Leaflet#6460)
Browse files Browse the repository at this point in the history
* Add shadowPane option to Marker

Add shadowPane option to Marker, so developers can specify pane for marker's shadow as suggested in Leaflet#6447

* Update Marker.js
  • Loading branch information
alexfig authored and Schleuse committed Dec 3, 2019
1 parent 0a34c95 commit d9ca22d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/layer/marker/Marker.js
Expand Up @@ -64,6 +64,10 @@ export var Marker = Layer.extend({
// `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
// (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used).
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 d9ca22d

Please sign in to comment.