Customize media markers
This commit is contained in:
@@ -299,6 +299,7 @@ export default {
|
||||
*/
|
||||
|
||||
//Medias
|
||||
//TODO Use same way of displaying markers (so that openMarkerPopup works on all markers)
|
||||
this.markers.medias.forEach(msg => {
|
||||
const $Marker = document.createElement('div');
|
||||
const app = createApp(SpotIconStack, {iconMain: 'message', iconSub:'image'});
|
||||
@@ -315,8 +316,8 @@ export default {
|
||||
.setMaxWidth(300)
|
||||
.addTo(this.map)
|
||||
;
|
||||
console.log(msg);
|
||||
const popupContent = createApp(ProjectPopup, {
|
||||
type: 'media',
|
||||
options: msg,
|
||||
medias: [msg],
|
||||
project: this.currProject
|
||||
@@ -416,6 +417,7 @@ export default {
|
||||
.addTo(this.map);
|
||||
|
||||
this.popup.content = createApp(ProjectPopup, {
|
||||
type: 'message',
|
||||
options: oFeature.properties,
|
||||
medias: JSON.parse(oFeature.properties.medias || '[]'),
|
||||
project: this.currProject
|
||||
@@ -585,8 +587,9 @@ export default {
|
||||
}
|
||||
},
|
||||
async findPost(oPost) {
|
||||
if(this.goToPost(oPost)) {
|
||||
//if(oPost.type=='media' || oPost.type=='message') $Post.find('a.drill').click();
|
||||
let oRef = this.goToPost(oPost);
|
||||
if(oRef) {
|
||||
oRef.executeMainAction();
|
||||
}
|
||||
else if(!this.feed.outOfData) {
|
||||
await this.getNextFeed();
|
||||
@@ -598,17 +601,17 @@ export default {
|
||||
let bFound = false;
|
||||
let aoRefs = this.$refs.posts.filter((post) => {return post.postId == oPost.type+'-'+oPost.id;});
|
||||
if(aoRefs.length == 1) {
|
||||
let oRef = aoRefs[0];
|
||||
this.$refs.feedSimpleBar.scrollElement.scrollTop += Math.round(
|
||||
aoRefs[0].$el.getBoundingClientRect().top
|
||||
oRef.$el.getBoundingClientRect().top
|
||||
+ window.pageYOffset
|
||||
- parseFloat(getComputedStyle(this.$refs.feedSimpleBar.$el).paddingTop)
|
||||
);
|
||||
aoRefs[0].executeMainAction();
|
||||
|
||||
//this.spot.flushHash(['post', 'message']);
|
||||
bFound = true;
|
||||
|
||||
return oRef;
|
||||
}
|
||||
|
||||
return bFound;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user