Fix media marker popup

This commit is contained in:
2026-05-08 18:42:22 +02:00
parent 321e79c230
commit aa1856acb7
6 changed files with 113 additions and 67 deletions

View File

@@ -29,7 +29,6 @@ export default {
settingsPanelOpen: false,
track: null,
markers: [],
markerSize: {width: 32, height: 32},
markerProps: {
image: {mainClasses: 'media', iconMain: 'marker', iconSub: 'image'},
video: {mainClasses: 'media', iconMain: 'marker', iconSub: 'video'},
@@ -304,12 +303,12 @@ export default {
this.closePopup();
let oMarker = this.markers.find((oCandidate) => oCandidate.id == iMarkerId && oCandidate.type == sMarkerType);
this.openPopup({
offset: [0, this.markerSize.height * -1], //FIXME
lnglat: [oMarker.longitude, oMarker.latitude],
options: oMarker
options: oMarker,
offset: [0, -32] //FIXME
});
},
openPopup({offset=[0, 0], lnglat, options={}} = {}) {
openPopup({lnglat, options={}, offset=[0, 0]} = {}) {
const $Popup = document.createElement('div');
this.popup.element = new Popup({
anchor: 'bottom',