highlighting entite on opened superposed mapitem
This commit is contained in:
parent
c67afa76e3
commit
db51224556
@ -16,6 +16,7 @@ import Tween from "@tweenjs/tween.js";
|
||||
import { mapState, mapActions } from 'pinia'
|
||||
import { ConcernementsStore } from '@/stores/concernements'
|
||||
import { CommonStore } from '@/stores/common'
|
||||
import { mdiPictureInPictureBottomRight } from '@mdi/js';
|
||||
|
||||
export default {
|
||||
inject: ['canvasMap', 'matterEngine'],
|
||||
@ -1193,10 +1194,32 @@ export default {
|
||||
// superposition
|
||||
if (this.concernement.has_superpositions) {
|
||||
if (this.map_mode === "superposition") {
|
||||
if (!this.is_open) {
|
||||
this.paper_main_object.children.entites_superposes.visible = true; // if not opened and has_superpositions draw the entites_superposes points
|
||||
} else {
|
||||
this.paper_main_object.children.entites_superposes.visible = true;
|
||||
// highlight of entite part of opened superposition
|
||||
if (this.$route.query.superposition_id) {
|
||||
let superposition_id = this.$route.query.superposition_id;
|
||||
if(superposition_id){
|
||||
let ids = superposition_id.match(/(\d+)_(\d+)__(\d+)_(\d+)/i)
|
||||
let group = this.paper_main_object.children['entites_superposes'];
|
||||
if(group){
|
||||
group.children.forEach((item) => {
|
||||
if ( (this.cid === parseInt(ids[1]) && item.item_id === parseInt(ids[2]))
|
||||
|| (this.cid === parseInt(ids[3]) && item.item_id === parseInt(ids[4])) ) {
|
||||
item.definition = this.paper_symbol_definitions.entite_hover;
|
||||
if(!item.focused){
|
||||
item.scale(2)
|
||||
item.focused = true;
|
||||
}
|
||||
} else if(!this.is_hover) {
|
||||
item.definition = this.paper_symbol_definitions.entite;
|
||||
if (item.focused) {
|
||||
item.scale(0.5)
|
||||
item.focused = false;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.paper_main_object.children.entites_superposes.visible = false;
|
||||
@ -1258,6 +1281,9 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
onIsHover(){
|
||||
// handle layer z-index
|
||||
@ -1277,10 +1303,10 @@ export default {
|
||||
for(let paper_item of entites_superposes.children) {
|
||||
if (this.is_hover) {
|
||||
paper_item.definition = this.paper_symbol_definitions.entite_hover;
|
||||
paper_item.scale(2)
|
||||
// paper_item.scale(2)
|
||||
} else {
|
||||
paper_item.definition = this.paper_symbol_definitions.entite;
|
||||
paper_item.scale(0.5)
|
||||
// paper_item.scale(0.5)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user