This commit is contained in:
Bachir Soussi Chiadmi 2024-01-23 15:46:17 +01:00
parent b5aaeeeb6b
commit fb242da7f2

View File

@ -185,15 +185,18 @@ export default {
map_mode: {
handler (n, o) {
console.log('concernementMapItem watch map_mode', o, n);
// apply a little force to check the map when returning to terrain de vie
if (n === 'terraindevie' && !this.opened_concernement) {
this.applyShuffleForces(); // apply a little force to check the map when returning to terrain de vie
this.applyShuffleForces();
}
// if map_item is open and we change the mad mode, redefined what is displayed in the "boussole"
if (this.is_open & n !== o) {
this.setPaperContents();
}
if (n !== o) {
this.handlePaperVisibilityOnMapMode()
}
// Clones visibility
if(this.mapitem.clone){
let is_visible = false;
if(n === 'superposition'){
@ -204,7 +207,7 @@ export default {
if(this.mapitem.is_open){
is_visible = true;
}else{
// keep open the clones that are superposed to the opend map_item
// keep open the clones that are superposed to the opened map_item
let opened_mapitem_id = this.opened_concernement.opened_mapitem_id;
if (this.opened_concernement.superposed_mapitem_id_by_mapitem_id && this.opened_concernement.superposed_mapitem_id_by_mapitem_id[opened_mapitem_id]) {
if(this.opened_concernement.superposed_mapitem_id_by_mapitem_id[opened_mapitem_id].indexOf(this.mapitem.id) !== -1){
@ -1504,7 +1507,6 @@ export default {
// }
// }
},
handlePaperVisibilityOnMapMode(){},
handlePaperVisibilityOnAfterEnginUpdate(){
// contours focused
if (!this.isFocused()){