point bleu entite ouverte #2256

This commit is contained in:
Bachir Soussi Chiadmi 2023-07-19 12:55:57 +02:00
parent 4800d99ed7
commit 2bea597981
3 changed files with 32 additions and 5 deletions

View File

@ -1124,7 +1124,23 @@ export default {
this.paper_main_object.children.doleance_icon.visible = false;
}
}
// focus on opened entite
if (this.is_opened && this.opened_entite_id && (this.map_mode === 'terraindevie' || this.map_mode === 'action')) {
let group = this.map_mode === 'terraindevie' ? this.paper_main_object.children['entites'] : this.paper_main_object.children['agissantes'];
if(group){
group.children.forEach((item) => {
if (item.item_id === this.opened_entite_id) {
item.definition = item.item_type === 'entite' ? this.paper_symbol_definitions.entite_hover : this.paper_symbol_definitions.entite_action_hover;
} else {
if (!this.hover_elmt || item.item_id !== this.hover_elmt.id) {
item.definition = item.item_type === 'entite' ? this.paper_symbol_definitions.entite : this.paper_symbol_definitions.entite_action;
}
}
})
}
}
},
// PAPER EVENTS
initPaperEvents(){

View File

@ -57,6 +57,7 @@ export default {
'concernements',
'concernementsByID',
'opened_concernement',
'opened_entite_id',
'opened_recit'
]),
...mapState(CommonStore,['map_item_ray']),
@ -173,7 +174,9 @@ export default {
console.log(`symbol instance o.type:${o.type}, oitem`, oitem);
switch (o.type) {
case 'entite':
oitem.definition = this.paper_symbol_definitions.entite;
if (!this.opened_entite_id || this.opened_entite_id !== oitem.item_id) {
oitem.definition = this.paper_symbol_definitions.entite;
}
break;
case 'besoin':
oitem.definition = this.paper_symbol_definitions.besoin;
@ -182,7 +185,9 @@ export default {
oitem.definition = this.paper_symbol_definitions.reponse;
break;
case 'entite_action':
oitem.definition = this.paper_symbol_definitions.entite_action;
if (!this.opened_entite_id || this.opened_entite_id !== oitem.item_id) {
oitem.definition = this.paper_symbol_definitions.entite_action;
}
break;
}
}

View File

@ -108,7 +108,7 @@ export default {
<!-- TODO update entite with revisions -->
<span v-if="entite && opened_concernement.entites_byid[eid].menacemaintien < 0" class="menacemaintient">est menacé par</span>
<span v-if="entite && opened_concernement.entites_byid[eid].menacemaintien > 0" class="menacemaintient">est maintienu par</span>
<h3 v-if="entite">&bull;&ThinSpace;{{ entite.title }}</h3>
<h3 v-if="entite"><span class="entite-point">&bull;</span>&ThinSpace;{{ entite.title }}</h3>
</div>
</template>
@ -165,4 +165,10 @@ export default {
</template>
</CartoucheLayout>
</template>
</template>
<style lang="css">
span.entite-point{
color: #01ffe2;
}
</style>