wip: fix popup position for markers

Not sure what changed during the refactor, but now all popups
where opening at click position (plus the popupAnchor for markers).
This commit is contained in:
Yohan Boniface 2024-07-26 14:34:08 +02:00
parent f80d471203
commit 25d12420b2

View file

@ -220,6 +220,11 @@ export const LeafletMarker = Marker.extend({
resetHighlight: function () {
DomUtil.removeClass(this.options.icon.elements.main, 'umap-icon-active')
},
openPopup: function () {
// Always open on marker position (vs click position for paths)
this.parentClass.prototype.openPopup.apply(this, this.getCenter())
},
})
const PathMixin = {