loop bug fix

This commit is contained in:
Bachir Soussi Chiadmi 2024-06-03 13:06:25 +02:00
parent 16f0e0818c
commit 883e7b5896

View File

@ -68,6 +68,7 @@ export default {
//
doleance_transition: false,
//
paperContentsIsSet: false,
}
},
@ -217,7 +218,7 @@ export default {
// 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();
this.resetPaperContents();
this.resetMapItemPosition();
this.resetMapItemScale();
}
@ -843,34 +844,43 @@ export default {
console.log('setPaperContents');
// trigered once opening tween is complete
// trigered once mapmode changed
this.clearPaperContents();
switch(this.map_mode){
case 'terraindevie':
this.addNewPaperSymbolInstance('boussole_bg', true);
this.paper_main_object.addChild(this.setPaperEntites());
// this.setPaperEntitesEvents();
break;
case 'superposition':
this.addNewPaperSymbolInstance('boussole_bg', true);
break;
case 'proximite':
this.addNewPaperSymbolInstance('boussole_bg', true);
this.paper_main_object.addChild(this.setPaperEntitesProximiteReferences());
break;
case 'puissancedagir':
this.addNewPaperSymbolInstance('puissanceagir_bg', true);
this.paper_main_object.addChild(this.setPaperPuissanceagirBesoins());
break;
case 'action':
this.addNewPaperSymbolInstance('boussole_bg', true);
this.paper_main_object.addChild(this.setPaperAgissantes());
break;
case 'doleancer':
this.addNewPaperSymbolInstance('doleance_bg');
this.paper_main_object.addChild(this.setPaperDoleances());
break;
// triggerd when reseting papercontents
if (!this.paperContentsIsSet) {
this.clearPaperContents();
switch(this.map_mode){
case 'terraindevie':
this.addNewPaperSymbolInstance('boussole_bg', true);
this.paper_main_object.addChild(this.setPaperEntites());
// this.setPaperEntitesEvents();
break;
case 'superposition':
this.addNewPaperSymbolInstance('boussole_bg', true);
break;
case 'proximite':
this.addNewPaperSymbolInstance('boussole_bg', true);
this.paper_main_object.addChild(this.setPaperEntitesProximiteReferences());
break;
case 'puissancedagir':
this.addNewPaperSymbolInstance('puissanceagir_bg', true);
this.paper_main_object.addChild(this.setPaperPuissanceagirBesoins());
break;
case 'action':
this.addNewPaperSymbolInstance('boussole_bg', true);
this.paper_main_object.addChild(this.setPaperAgissantes());
break;
case 'doleancer':
this.addNewPaperSymbolInstance('doleance_bg');
this.paper_main_object.addChild(this.setPaperDoleances());
break;
}
this.paperContentsIsSet = true;
}
},
resetPaperContents(){
this.paperContentsIsSet = false;
this.setPaperContents();
},
resetPaperEntitesAndContours(){
console.log(`concernementMapitem ${this.id} resetPaperEntitesAndContours this.concernement`, this.concernement);
if (!this.isResetingPaperEntites) {