fixed agissante picto bug #2190
This commit is contained in:
		| @@ -50,6 +50,7 @@ fragment ConcernementFields on Concernement { | ||||
|       actuelfuture | ||||
|       entite { | ||||
|         id | ||||
|         agissante | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|   | ||||
| @@ -464,7 +464,6 @@ export default { | ||||
|         this.addNewPaperSymbolInstance('puissanceagir_icon'); | ||||
|       } | ||||
|       if (this.concernement.has_agissantes) { | ||||
|         // TODO icons | ||||
|         this.paper_main_object.addChild(this.setPaperAgissantesIcons()); | ||||
|       } | ||||
|       if (this.concernement.has_doleance) { | ||||
| @@ -633,20 +632,23 @@ export default { | ||||
|       return g; | ||||
|     }, | ||||
|     setPaperAgissantes(){ | ||||
|       console.log('setPaperAgissantes'); | ||||
|       let g = new paper.Group({ | ||||
|         pivot: new paper.Point(this.pos), | ||||
|         name: 'agissantes' | ||||
|       }); | ||||
|        | ||||
|       for (let i = 0; i < this.entites.length; i++) { | ||||
|         if (this.entites[i].entite && this.entites[i].entite.agissante) { | ||||
|       for (let i = 0; i < this.concernement.revisions_byid[this.concernement.revision_id].entites.length; i++) { | ||||
|         let entite = this.concernement.revisions_byid[this.concernement.revision_id].entites[i]; | ||||
|         console.log('agissantes', entite); | ||||
|         if (entite.entite && entite.entite.agissante) { | ||||
|           let instance = new paper.SymbolItem(this.paper_symbol_definitions['entite_action']); | ||||
|           instance.name = 'entite_action'; | ||||
|           instance.position = new paper.Point([this.pos.x + this.entites[i].display.pos.x * this.scale, this.pos.y + this.entites[i].display.pos.y * this.scale]); | ||||
|           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 = this.entites[i].entite.id; | ||||
|           instance.item_id = entite.entite.id; | ||||
|           instance.item_type = 'entite_action'; | ||||
|           instance.is_symbol_instance = true; | ||||
|           g.addChild(instance) | ||||
| @@ -659,15 +661,16 @@ export default { | ||||
|         pivot: new paper.Point(this.pos), | ||||
|         name: 'agissantes_icons' | ||||
|       }); | ||||
|       for (let i = 0; i < this.entites.length; i++) { | ||||
|         if (this.entites[i].entite && this.entites[i].entite.agissante) { | ||||
|       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 + this.entites[i].display.pos.x * this.scale, this.pos.y + this.entites[i].display.pos.y * this.scale]); | ||||
|           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 = this.entites[i].entite.id; | ||||
|           instance.item_id = entite.entite.id; | ||||
|           instance.item_type = 'entite_action'; | ||||
|           instance.is_symbol_instance = true; | ||||
|           g.addChild(instance) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user