Customize media markers
This commit is contained in:
@@ -32,7 +32,8 @@
|
||||
anchorIcon: 'link',
|
||||
popupRequested: false,
|
||||
postMessage: '',
|
||||
sending: false
|
||||
sending: false,
|
||||
focusZoomLevel: 15
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -60,7 +61,11 @@
|
||||
return this.modeHisto?(this.options.formatted_time || '').substr(0, 10):this.options.relative_time;
|
||||
},
|
||||
lngLat() {
|
||||
return (this.options.type == 'message')?(new LngLat(this.options.longitude, this.options.latitude)):null;
|
||||
return (
|
||||
['message', 'media'].includes(this.options.type)
|
||||
&& this.options.longitude
|
||||
&& this.options.latitude
|
||||
)?(new LngLat(this.options.longitude, this.options.latitude)):null;
|
||||
}
|
||||
|
||||
},
|
||||
@@ -80,7 +85,7 @@
|
||||
if(this.spot.isMobile()) this.project.toggleFeedPanel(false, 'panToInstant');
|
||||
this.map.panToBetweenPanels(
|
||||
this.lngLat,
|
||||
15,
|
||||
this.focusZoomLevel,
|
||||
() => {this.map.openMarkerPopup(this.options.id_message);}
|
||||
);
|
||||
},
|
||||
@@ -119,6 +124,7 @@
|
||||
break;
|
||||
case 'media':
|
||||
this.$refs.medialink.openMedia();
|
||||
if(this.lngLat) this.map.panToBetweenPanels(this.lngLat, this.focusZoomLevel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user