mapmode action done

This commit is contained in:
Bachir Soussi Chiadmi 2023-07-07 10:51:25 +02:00
parent 213f151557
commit 901c66fe9a
5 changed files with 53 additions and 8 deletions

View File

@ -565,12 +565,13 @@ export default {
}); });
for (let i = 0; i < this.entites.length; i++) { for (let i = 0; i < this.entites.length; i++) {
if (this.entites[i].entite.agissante) { if (this.entites[i].entite.agissante) {
let instance = new paper.SymbolItem(this.paper_symbol_definitions['entite']); let instance = new paper.SymbolItem(this.paper_symbol_definitions['entite_action']);
instance.name = 'entite'; instance.name = 'entite_action';
instance.position = new paper.Point([this.pos.x + this.entites[i].display.pos.x, this.pos.y + this.entites[i].display.pos.y]); instance.position = new paper.Point([this.pos.x + this.entites[i].display.pos.x, this.pos.y + this.entites[i].display.pos.y]);
instance.fillColor = '#000'; instance.fillColor = '#000';
instance.scale(0.2);
instance.item_id = this.entites[i].entite.id; instance.item_id = this.entites[i].entite.id;
instance.item_type = 'entite'; instance.item_type = 'entite_action';
instance.is_symbol_instance = true; instance.is_symbol_instance = true;
g.addChild(instance) g.addChild(instance)
} }
@ -909,6 +910,7 @@ export default {
// choose wich one to show, if one // choose wich one to show, if one
switch (this.map_mode) { switch (this.map_mode) {
case 'terraindevie': case 'terraindevie':
case 'action':
this.paper_main_object.children.boussole_bg.visible = true; this.paper_main_object.children.boussole_bg.visible = true;
break; break;
case 'puissancedagir': case 'puissancedagir':

View File

@ -26,7 +26,7 @@ export default {
// console.log(`popup created type: ${this.infos.type}`, this.infos); // console.log(`popup created type: ${this.infos.type}`, this.infos);
if (this.infos.type === 'concernement') { if (this.infos.type === 'concernement') {
this.concernement = this.concernementsByID[this.infos.id]; this.concernement = this.concernementsByID[this.infos.id];
} else if(this.infos.type === 'entite') { } else if(this.infos.type === 'entite' || this.infos.type === 'entite_action') {
this.entite = this.allEntitesById[this.infos.id]; this.entite = this.allEntitesById[this.infos.id];
} else if (this.infos.type === 'besoin') { } else if (this.infos.type === 'besoin') {
this.besoin = this.allBesoinsById[this.infos.id]; this.besoin = this.allBesoinsById[this.infos.id];
@ -55,7 +55,7 @@ export default {
handler (n, o){ handler (n, o){
if (n.type === 'concernement') { if (n.type === 'concernement') {
this.concernement = this.concernementsByID[n.id]; this.concernement = this.concernementsByID[n.id];
} else if(n.type === 'entite') { } else if(n.type === 'entite' || n.type === 'entite_action') {
this.entite = this.allEntitesById[this.infos.id]; this.entite = this.allEntitesById[this.infos.id];
} else if (n.type === 'besoin') { } else if (n.type === 'besoin') {
this.besoin = this.allBesoinsById[this.infos.id]; this.besoin = this.allBesoinsById[this.infos.id];
@ -132,7 +132,7 @@ export default {
<svg-icon type="mdi" :path="headphones_path"></svg-icon> <svg-icon type="mdi" :path="headphones_path"></svg-icon>
</section> </section>
<section v-if="infos.type === 'entite'" class="entite-map-popup"> <section v-if="infos.type === 'entite' || infos.type === 'entite_action'" class="entite-map-popup">
<h1>{{ entite.entite.title }}</h1> <h1>{{ entite.entite.title }}</h1>
</section> </section>
<section v-if="infos.type === 'besoin'" class="besoin-map-popup"> <section v-if="infos.type === 'besoin'" class="besoin-map-popup">

View File

@ -22,7 +22,7 @@ import ConcernementMapPopup from '@components/ConcernementMapPopup.vue';
// import iconProximite from "@/assets/icons/proximite.svg" // import iconProximite from "@/assets/icons/proximite.svg"
// import iconSuperposition from "@/assets/icons/superposition.svg" // import iconSuperposition from "@/assets/icons/superposition.svg"
import iconPuissanceagir from "@/assets/icons/puissancedagir.svg" import iconPuissanceagir from "@/assets/icons/puissancedagir.svg"
// import iconAction from "@/assets/icons/action.svg" import iconAction from "@/assets/icons/action.svg"
import iconDoleancer from "@/assets/icons/doleancer.svg" import iconDoleancer from "@/assets/icons/doleancer.svg"
export default { export default {
@ -149,6 +149,9 @@ export default {
case 'reponse': case 'reponse':
nitem.definition = this.paper_symbol_definitions.reponse_hover; nitem.definition = this.paper_symbol_definitions.reponse_hover;
break; break;
case 'entite_action':
nitem.definition = this.paper_symbol_definitions.entite_action_hover;
break;
} }
} }
} }
@ -174,6 +177,9 @@ export default {
case 'reponse': case 'reponse':
oitem.definition = this.paper_symbol_definitions.reponse; oitem.definition = this.paper_symbol_definitions.reponse;
break; break;
case 'entite_action':
oitem.definition = this.paper_symbol_definitions.entite_action;
break;
} }
} }
@ -200,6 +206,8 @@ export default {
// //
this.addPaperSymbolDefinition('entite', this.setPaperEntiteSymbol()); this.addPaperSymbolDefinition('entite', this.setPaperEntiteSymbol());
this.addPaperSymbolDefinition('entite_hover', this.setPaperEntiteHoverSymbol()); this.addPaperSymbolDefinition('entite_hover', this.setPaperEntiteHoverSymbol());
this.addPaperSymbolDefinition('entite_action', this.setPaperEntiteActionSymbol());
this.addPaperSymbolDefinition('entite_action_hover', this.setPaperEntiteActionHoverSymbol());
this.addPaperSymbolDefinition('besoin', this.setPaperBesoinSymbol()); this.addPaperSymbolDefinition('besoin', this.setPaperBesoinSymbol());
this.addPaperSymbolDefinition('besoin_hover', this.setPaperBesoinHoverSymbol()); this.addPaperSymbolDefinition('besoin_hover', this.setPaperBesoinHoverSymbol());
this.addPaperSymbolDefinition('reponse', this.setPaperReponseSymbol()); this.addPaperSymbolDefinition('reponse', this.setPaperReponseSymbol());
@ -863,6 +871,40 @@ export default {
strokeWidth:2 strokeWidth:2
}) })
}, },
setPaperEntiteActionSymbol(){
let svgIcon = paper.project.importSVG(iconAction);
svgIcon.strokeColor = '#000';
svgIcon.strokeWidth = 0.75;
svgIcon.fillColor = null;
svgIcon.position = {x:0, y:0};
let circle = new paper.Path.Circle({
radius: 15,
fillColor: 'rgba(255,255,255,0.05)'
})
return new paper.Group({
children: [circle, svgIcon],
name: 'action_icon'
});
},
setPaperEntiteActionHoverSymbol(){
let svgIcon = paper.project.importSVG(iconAction);
svgIcon.strokeColor = '#01ffe2';
svgIcon.strokeWidth = 0.75;
svgIcon.fillColor = null;
svgIcon.position = {x:0, y:0};
let circle = new paper.Path.Circle({
radius: 15,
fillColor: 'rgba(255,255,255,0.05)'
})
return new paper.Group({
children: [circle, svgIcon],
name: 'action_icon'
});
},
setPaperBesoinSymbol(){ setPaperBesoinSymbol(){
return new paper.Path({ return new paper.Path({
pivot: new paper.Point(this.pos), pivot: new paper.Point(this.pos),

View File

@ -62,6 +62,7 @@ export default {
v-for="(video,v) in source.videos" v-for="(video,v) in source.videos"
:key="v"> :key="v">
<div class="plyr__video-embed"> <div class="plyr__video-embed">
<!-- TODO fix vimeo embed url -->
<iframe <iframe
:src="video.url" :src="video.url"
allowfullscreen allowfullscreen

View File

@ -109,7 +109,7 @@ export default {
<template> <template>
<section v-if="opened_concernement" class="concernement"> <section v-if="opened_concernement" class="concernement">
<TerrainDeVie v-if="map_mode === 'terraindevie'" :id="id" :eid="eid" :entite="entite"/> <TerrainDeVie v-if="map_mode === 'terraindevie' || map_mode === 'action'" :id="id" :eid="eid" :entite="entite"/>
<PuissanceAgir v-if="map_mode === 'puissancedagir'" :id="id"/> <PuissanceAgir v-if="map_mode === 'puissancedagir'" :id="id"/>
<Doleancer v-if="map_mode === 'doleancer'" :id="id"/> <Doleancer v-if="map_mode === 'doleancer'" :id="id"/>