diff --git a/src/components/ConcernementMapItem.vue b/src/components/ConcernementMapItem.vue index 27896e4..22771d4 100644 --- a/src/components/ConcernementMapItem.vue +++ b/src/components/ConcernementMapItem.vue @@ -524,15 +524,15 @@ export default { this.paper_main_object.addChild(this.setPaperEntitesSuperposees()); } - if (this.concernement.has_puissancedagir) { - this.addNewPaperSymbolInstance('puissanceagir_icon', false, 0.7); - } - if (this.concernement.has_agissantes) { - this.paper_main_object.addChild(this.setPaperAgissantesIcons()); - } - if (this.concernement.has_doleance) { - this.addNewPaperSymbolInstance('doleance_icon', false, 0.7); - } + // if (this.concernement.has_puissancedagir) { + // this.addNewPaperSymbolInstance('puissanceagir_icon', false, 0.7); + // } + // if (this.concernement.has_agissantes) { + // this.paper_main_object.addChild(this.setPaperAgissantesIcons()); + // } + // if (this.concernement.has_doleance) { + // this.addNewPaperSymbolInstance('doleance_icon', false, 0.7); + // } this.initPaperEvents() }, @@ -755,28 +755,28 @@ export default { } return g; }, - setPaperAgissantesIcons(){ - let g = new paper.Group({ - pivot: new paper.Point(this.pos), - name: 'agissantes_icons' - }); - for (let i = 0; i < this.concernement.revisions_byid[this.concernement.revision_id].entites.length; i++) { - let entite = this.concernement.revisions_byid[this.concernement.active_revision].entites[i]; - if (entite.entite && entite.entite.agissante) { - let instance = new paper.SymbolItem(this.paper_symbol_definitions['entite_action_icon']); - instance.name = 'entite_action'; - instance.position = new paper.Point([this.pos.x + entite.display.pos.x * this.scale, this.pos.y + entite.display.pos.y * this.scale]); - instance.fillColor = '#000'; - // instance.scale(0.2); - instance.scale(this.scale); - instance.item_id = entite.entite.id; - instance.item_type = 'entite_action'; - instance.is_symbol_instance = true; - g.addChild(instance) - } - } - return g; - }, + // setPaperAgissantesIcons(){ + // let g = new paper.Group({ + // pivot: new paper.Point(this.pos), + // name: 'agissantes_icons' + // }); + // for (let i = 0; i < this.concernement.revisions_byid[this.concernement.revision_id].entites.length; i++) { + // let entite = this.concernement.revisions_byid[this.concernement.active_revision].entites[i]; + // if (entite.entite && entite.entite.agissante) { + // let instance = new paper.SymbolItem(this.paper_symbol_definitions['entite_action_icon']); + // instance.name = 'entite_action'; + // instance.position = new paper.Point([this.pos.x + entite.display.pos.x * this.scale, this.pos.y + entite.display.pos.y * this.scale]); + // instance.fillColor = '#000'; + // // instance.scale(0.2); + // instance.scale(this.scale); + // instance.item_id = entite.entite.id; + // instance.item_type = 'entite_action'; + // instance.is_symbol_instance = true; + // g.addChild(instance) + // } + // } + // return g; + // }, setPaperPuissanceagirBesoins(){ let g = new paper.Group({ pivot: new paper.Point(this.pos), @@ -1143,14 +1143,14 @@ export default { }, // PAPER VISIBILITY handlePaperVisibilityOnBeforeOpen(){ - // agissantes - if (this.concernement.has_agissantes && this.map_mode === "action") { - if (!this.is_open) { - this.paper_main_object.children.agissantes_icons.visible = true; - } else { - this.paper_main_object.children.agissantes_icons.visible = false; - } - } + // // agissantes + // if (this.concernement.has_agissantes && this.map_mode === "action") { + // if (!this.is_open) { + // this.paper_main_object.children.agissantes_icons.visible = true; + // } else { + // this.paper_main_object.children.agissantes_icons.visible = false; + // } + // } // superposition // scale down superposed entites on open @@ -1177,14 +1177,14 @@ export default { } }, handlePaperVisibilityOnClosed(){ - // agissantes - if (this.concernement.has_agissantes && this.map_mode === "action") { - if (!this.is_open) { - this.paper_main_object.children.agissantes_icons.visible = true; - } else { - this.paper_main_object.children.agissantes_icons.visible = false; - } - } + // // agissantes + // if (this.concernement.has_agissantes && this.map_mode === "action") { + // if (!this.is_open) { + // this.paper_main_object.children.agissantes_icons.visible = true; + // } else { + // this.paper_main_object.children.agissantes_icons.visible = false; + // } + // } }, handlePaperVisibilityOnMapMode(){}, handlePaperVisibilityOnAfterEnginUpdate(){ @@ -1259,42 +1259,42 @@ export default { } } - // puissance d'agir - if (this.concernement.has_puissancedagir) { - if (this.map_mode === "puissancedagir") { - if (!this.is_open) { - this.paper_main_object.children.puissanceagir_icon.visible = true; // if not opened and has_puissancedagir draw the puissance d'agir icone - } else { - this.paper_main_object.children.puissanceagir_icon.visible = false; - } - } else { - this.paper_main_object.children.puissanceagir_icon.visible = false; - } - } + // // puissance d'agir + // if (this.concernement.has_puissancedagir) { + // if (this.map_mode === "puissancedagir") { + // if (!this.is_open) { + // this.paper_main_object.children.puissanceagir_icon.visible = true; // if not opened and has_puissancedagir draw the puissance d'agir icone + // } else { + // this.paper_main_object.children.puissanceagir_icon.visible = false; + // } + // } else { + // this.paper_main_object.children.puissanceagir_icon.visible = false; + // } + // } // agissantes - if (this.concernement.has_agissantes) { - if (this.map_mode !== "action") { - this.paper_main_object.children.agissantes_icons.visible = false; - } else if(!this.is_open && !this.is_closing){ - this.paper_main_object.children.agissantes_icons.visible = true; - } - } + // if (this.concernement.has_agissantes) { + // if (this.map_mode !== "action") { + // this.paper_main_object.children.agissantes_icons.visible = false; + // } else if(!this.is_open && !this.is_closing){ + // this.paper_main_object.children.agissantes_icons.visible = true; + // } + // } // doleance if (this.concernement.has_doleance) { if (this.map_mode === "doleancer") { if (!this.is_open) { - this.paper_main_object.children.doleance_icon.visible = true; + // this.paper_main_object.children.doleance_icon.visible = true; } else { - this.paper_main_object.children.doleance_icon.visible = false; + // this.paper_main_object.children.doleance_icon.visible = false; // display the right (opened) doleance this.concernement.doleances.forEach((d) => { this.paper_main_object.children.doleances.children[`doleance_${d.id}`].visible = d.id === this.concernement.opened_doleance.id; }) } } else { - this.paper_main_object.children.doleance_icon.visible = false; + // this.paper_main_object.children.doleance_icon.visible = false; } } diff --git a/src/components/MapConcernements.vue b/src/components/MapConcernements.vue index ba9cc96..f9569dc 100644 --- a/src/components/MapConcernements.vue +++ b/src/components/MapConcernements.vue @@ -23,9 +23,9 @@ import RecitPlayer from '@components/RecitPlayer.vue'; // import iconTerraindevie from "@/assets/icons/terraindevie.svg" // import iconProximite from "@/assets/icons/proximite.svg" // import iconSuperposition from "@/assets/icons/superposition.svg" -import iconPuissanceagir from "@/assets/icons/puissancedagir.svg" -import iconAction from "@/assets/icons/action_2.svg" -import iconDoleancer from "@/assets/icons/doleancer.svg" +// import iconPuissanceagir from "@/assets/icons/puissancedagir.svg" +// import iconAction from "@/assets/icons/action_2.svg" +// import iconDoleancer from "@/assets/icons/doleancer.svg" export default { data() { @@ -282,9 +282,9 @@ export default { initPaperSymbols(){ this.addPaperSymbolDefinition('boussole_bg', this.setPaperBoussoleBGSymbol()); this.addPaperSymbolDefinition('puissanceagir_bg', this.setPaperPuissanceagirBGSymbol()); - this.addPaperSymbolDefinition('puissanceagir_icon', this.setPaperPuissanceagirICONSymbol()); + // this.addPaperSymbolDefinition('puissanceagir_icon', this.setPaperPuissanceagirICONSymbol()); this.addPaperSymbolDefinition('doleance_bg', this.setPaperDoleanceBGSymbol()); - this.addPaperSymbolDefinition('doleance_icon', this.setPaperDoleanceICONSymbol()); + // this.addPaperSymbolDefinition('doleance_icon', this.setPaperDoleanceICONSymbol()); // this.addPaperSymbolDefinition('entite', this.setPaperEntiteSymbol()); this.addPaperSymbolDefinition('entite_hidden', this.setPaperHiddenEntiteSymbol()); @@ -504,25 +504,25 @@ export default { } }); }, - setPaperPuissanceagirICONSymbol(){ - let children = []; + // setPaperPuissanceagirICONSymbol(){ + // let children = []; - let svgIcon = paper.project.importSVG(iconPuissanceagir); - children.push(svgIcon); - svgIcon.position = this.pos; + // let svgIcon = paper.project.importSVG(iconPuissanceagir); + // children.push(svgIcon); + // svgIcon.position = this.pos; - return new paper.Group({ - children: children, - pivot: new paper.Point(this.pos), - name: 'puissanceagir_icon', - locked: true, - style: { - strokeColor: '#000', - strokeWidth: 0.75, - fillColor: null - } - }); - }, + // return new paper.Group({ + // children: children, + // pivot: new paper.Point(this.pos), + // name: 'puissanceagir_icon', + // locked: true, + // style: { + // strokeColor: '#000', + // strokeWidth: 0.75, + // fillColor: null + // } + // }); + // }, setPaperDoleanceBGSymbol(){ let ray = this.map_item_ray; let pos = {x:0,y:0}; @@ -924,27 +924,25 @@ export default { // locked: true }); }, - setPaperDoleanceICONSymbol(){ - let children = []; + // setPaperDoleanceICONSymbol(){ + // let children = []; - let svgIcon = paper.project.importSVG(iconDoleancer); - children.push(svgIcon); - svgIcon.position = this.pos; + // let svgIcon = paper.project.importSVG(iconDoleancer); + // children.push(svgIcon); + // svgIcon.position = this.pos; - return new paper.Group({ - children: children, - pivot: new paper.Point(this.pos), - name: 'doleance_icon', - locked: true, - style: { - strokeColor: '#000', - strokeWidth: 0.75, - fillColor: null - } - }); - - - }, + // return new paper.Group({ + // children: children, + // pivot: new paper.Point(this.pos), + // name: 'doleance_icon', + // locked: true, + // style: { + // strokeColor: '#000', + // strokeWidth: 0.75, + // fillColor: null + // } + // }); + // }, setPaperEntiteSymbol(){ return new paper.Path.Circle({ pivot: new paper.Point({x:0,y:0}),