|
@@ -210,8 +210,9 @@ export default {
|
|
x: this.entites[i].display.ray * Math.cos(this.entites[i].display.alpha * (Math.PI/180)),
|
|
x: this.entites[i].display.ray * Math.cos(this.entites[i].display.alpha * (Math.PI/180)),
|
|
y: this.entites[i].display.ray * Math.sin(this.entites[i].display.alpha * (Math.PI/180))
|
|
y: this.entites[i].display.ray * Math.sin(this.entites[i].display.alpha * (Math.PI/180))
|
|
}
|
|
}
|
|
-
|
|
|
|
- this.entites_byid[entite.entite.id].display = this.entites[i].display;
|
|
|
|
|
|
+ if (entite.entite) {
|
|
|
|
+ this.entites_byid[entite.entite.id].display = this.entites[i].display;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
getSalientPoints_OLD() {
|
|
getSalientPoints_OLD() {
|
|
@@ -557,12 +558,13 @@ export default {
|
|
});
|
|
});
|
|
for (let i = 0; i < this.entites.length; i++) {
|
|
for (let i = 0; i < this.entites.length; i++) {
|
|
// use paper symbol
|
|
// use paper symbol
|
|
- let instance = new paper.SymbolItem(this.paper_symbol_definitions['entite']);
|
|
|
|
|
|
+ let symbol_name = this.entites[i].entite ? 'entite' : 'entite_hidden';
|
|
|
|
+ let instance = new paper.SymbolItem(this.paper_symbol_definitions[symbol_name]);
|
|
instance.name = 'entite';
|
|
instance.name = 'entite';
|
|
instance.position = new paper.Point([this.pos.x + this.entites[i].display.pos.x, this.pos.y + this.entites[i].display.pos.y]);
|
|
instance.position = new paper.Point([this.pos.x + this.entites[i].display.pos.x, this.pos.y + this.entites[i].display.pos.y]);
|
|
instance.fillColor = '#000';
|
|
instance.fillColor = '#000';
|
|
- instance.item_id = this.entites[i].entite.id;
|
|
|
|
- instance.item_type = 'entite';
|
|
|
|
|
|
+ instance.item_id = this.entites[i].entite ? this.entites[i].entite.id : null;
|
|
|
|
+ instance.item_type = this.entites[i].entite ? 'entite' : 'hidden_entite';
|
|
instance.is_symbol_instance = true;
|
|
instance.is_symbol_instance = true;
|
|
g.addChild(instance)
|
|
g.addChild(instance)
|
|
}
|
|
}
|
|
@@ -574,7 +576,7 @@ export default {
|
|
name: 'agissantes'
|
|
name: 'agissantes'
|
|
});
|
|
});
|
|
for (let i = 0; i < this.entites.length; i++) {
|
|
for (let i = 0; i < this.entites.length; i++) {
|
|
- if (this.entites[i].entite.agissante) {
|
|
|
|
|
|
+ if (this.entites[i].entite && this.entites[i].entite.agissante) {
|
|
let instance = new paper.SymbolItem(this.paper_symbol_definitions['entite_action']);
|
|
let instance = new paper.SymbolItem(this.paper_symbol_definitions['entite_action']);
|
|
instance.name = 'entite_action';
|
|
instance.name = 'entite_action';
|
|
instance.position = new paper.Point([this.pos.x + this.entites[i].display.pos.x, this.pos.y + this.entites[i].display.pos.y]);
|
|
instance.position = new paper.Point([this.pos.x + this.entites[i].display.pos.x, this.pos.y + this.entites[i].display.pos.y]);
|