|
@@ -171,7 +171,7 @@ export default {
|
|
|
},
|
|
|
opened_concernement: {
|
|
|
handler (n, o) {
|
|
|
- console.log(`concernementMapitem ${this.cid} watch opened_concernement o, n`, o, n);
|
|
|
+ // console.log(`concernementMapitem ${this.cid} watch opened_concernement o, n`, o, n);
|
|
|
if (!n) { // if there is no opened concernement
|
|
|
this.is_open = false;
|
|
|
if (this.active_revision !== this.concernement.active_revision) {
|
|
@@ -291,8 +291,15 @@ export default {
|
|
|
// console.log(`concernementMapItem watch concernement o.opened_doleance:${o.opened_doleance.id}, n.opened_doleance:${n.opened_doleance.id}`);
|
|
|
// }
|
|
|
|
|
|
- if (this.is_open && this.map_mode === "puissancedagir") {
|
|
|
- this.setPaperContents();
|
|
|
+
|
|
|
+ },
|
|
|
+ deep: true
|
|
|
+ },
|
|
|
+ 'concernement.besoins.length': {
|
|
|
+ handler (n, o){
|
|
|
+ console.log(`ConcernementMapItem ${this.id} watch concernement.besoins.length o, n`, o, n);
|
|
|
+ if (this.is_open && this.map_mode === "puissancedagir" && o != null && n !== o) {
|
|
|
+ this.resetPaperContents();
|
|
|
}
|
|
|
},
|
|
|
deep: true
|
|
@@ -1469,6 +1476,7 @@ export default {
|
|
|
// return g;
|
|
|
// },
|
|
|
setPaperPuissanceagirBesoins(){
|
|
|
+ console.log(`setPaperPuissanceagirBesoins cid:${this.concernement.id}`);
|
|
|
let g = new paper.Group({
|
|
|
pivot: new paper.Point(this.pos),
|
|
|
name: 'puissanceagir_besoins'
|
|
@@ -1493,6 +1501,7 @@ export default {
|
|
|
besoin.item_cid = this.concernement.id;
|
|
|
besoin.item_type = 'besoin';
|
|
|
besoin.is_symbol_instance = true;
|
|
|
+
|
|
|
console.log(`paper besoin id:${besoin.id}`);
|
|
|
this.setBesoinPaperId(besoin.id, this.cid, this.concernement.besoins[i].id);
|
|
|
g.addChild(besoin)
|