tested consraint to move the opened body, not very satisfying

This commit is contained in:
2023-04-04 17:15:51 +02:00
parent a74fe1d9b5
commit eaeb366ffb
2 changed files with 41 additions and 23 deletions

View File

@@ -105,6 +105,7 @@ export default {
},
onClick (e) {
console.log('onClick', this, e);
// get the clicked element from matter
const query = Matter.Query.point(Matter.Composite.allBodies(this.world), this.mouse.position)
// console.log(this.mouse.position);
// console.log(query);
@@ -113,7 +114,6 @@ export default {
// console.log('body id:', elmt.id);
clickedIDs.push(elmt.id);
});
let opend
this.concernements.forEach((concernement, index) => {
this.openCloseConcernement(concernement.id, clickedIDs.indexOf(concernement.id) !== -1)
});