highlighting opened entite on canvas

This commit is contained in:
2023-04-19 16:36:50 +02:00
parent 45e8f31bd8
commit fb8903a9ce
3 changed files with 25 additions and 12 deletions

View File

@@ -34,7 +34,7 @@ export default {
return {
id: null,
entities: null,
opened_entite_id: null,
// opened_entite_id: null,
canvas: null,
ctx: null,
pos : {
@@ -53,7 +53,8 @@ export default {
},
props: ['concernement', 'opened'],
computed: {
...mapState(ConcernementsStore,['concernementsByID'])
...mapState(ConcernementsStore,['concernementsByID']),
...mapState(ConcernementsStore,['opened_entite_id'])
},
created () {
// console.log(`ConcernementsMapItem ${this.concernement.id} created`, this.canvasMap, this.matterEngine);
@@ -61,13 +62,13 @@ export default {
this.entites = this.concernement.entites
this.entites_byid = this.concernement.entites_byid
console.log(`ConcernementsMapItem ${this.concernement.id} $route`, this.id, this.$route);
if (this.$route.name === 'concernement'
&& parseInt(this.$route.params.id) === this.id
&& typeof this.$route.params.eid !== "undefined") {
console.log("we have an entity");
this.opened_entite_id = parseInt(this.$route.params.eid);
}
// console.log(`ConcernementsMapItem ${this.concernement.id} $route`, this.id, this.$route);
// if (this.$route.name === 'concernement'
// && parseInt(this.$route.params.id) === this.id
// && typeof this.$route.params.eid !== "undefined") {
// // console.log("we have an entity");
// this.opened_entite_id = parseInt(this.$route.params.eid);
// }
this.parsePoints()
this.getSalientPoints()