superpositions: displaying the right entite to the right map_item

This commit is contained in:
2023-09-12 11:20:11 +02:00
parent 8377a4b2b1
commit aae6d0c9d5
4 changed files with 113 additions and 47 deletions

View File

@@ -1068,19 +1068,19 @@ export default {
matter_bodyA_id = superposition[0].cid
matter_bodyB_id = superposition[1].cid
} else {
matter_bodyA_id = `${superposition[0].cid}_${superposition_id}`
matter_bodyB_id = `${superposition[1].cid}_${superposition_id}`
matter_bodyA_id = `${superposition[0].cid}___${superposition_id}`
matter_bodyB_id = `${superposition[1].cid}___${superposition_id}`
}
// get the concernement matter bodies with id
let bodyA = Matter.Composite.get(this.world, matter_bodyA_id, 'body');
let bodyB = Matter.Composite.get(this.world, matter_bodyB_id, 'body');
console.log('bodyA, bodyB', bodyA, bodyB);
// console.log('bodyA, bodyB', bodyA, bodyB);
// get the entite coordinates inside the concernement body
let pointA = null;
let concernementA = this.concernementsByID[superposition[0].cid];
console.log('concernementA', concernementA);
// console.log('concernementA', concernementA);
for(let entiteA of concernementA.revisions_byid[concernementA.active_revision].entites){
if (entiteA.entite && entiteA.entite.id === superposition[0].eid && entiteA.display) {
// console.log('entiteA', entiteA);
@@ -1090,7 +1090,7 @@ export default {
}
let pointB = null;
let concernementB = this.concernementsByID[superposition[1].cid];
console.log('concernementB', concernementB);
// console.log('concernementB', concernementB);
for(let entiteB of concernementB.revisions_byid[concernementB.active_revision].entites){
if (entiteB.entite && entiteB.entite.id === superposition[1].eid && entiteB.display) {
// console.log('entiteB', entiteB);