scaling superpositions constraints on concernement opening
This commit is contained in:
@@ -92,25 +92,14 @@ export const ConcernementsStore = defineStore({
|
||||
// SUPERPOSITIONS
|
||||
if (entite.entite.superposition.length) {
|
||||
concernement.has_superpositions = true;
|
||||
concernement.superposition_constraints = {};
|
||||
concernement.superposed_concernements_id = [];
|
||||
entite.entite.superposition.forEach(entite_superpose => {
|
||||
// console.log(`superposition eid:${entite.entite.id}, teid:${entite_superpose.id}`);
|
||||
let already_recorded = false;
|
||||
// loop through all already recorded superposition to complete the array instead of create duplicates
|
||||
// TODO check if target cid and eid are accessible before recording the superposition
|
||||
for(let superposition of this.allSuperpositions) {
|
||||
// if (superposition.indexOf(entite_superpose.id) >= 0) {
|
||||
// already_recorded = true;
|
||||
// if (superposition.indexOf(entite.entite.id) < 0) {
|
||||
// superposition.push(entite.entite.id)
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// if (superposition.indexOf(entite.entite.id) >= 0) {
|
||||
// already_recorded = true;
|
||||
// if (superposition.indexOf(entite_superpose.id) < 0) {
|
||||
// superposition.push(entite_superpose.id)
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
for(let superposition_item of superposition) {
|
||||
if (superposition_item.eid === entite.entite.id && !superposition_item.cid) {
|
||||
console.log(`already_recorded, eid:${entite.entite.id}, teid:${entite_superpose.id}`, entite.entite.title);
|
||||
@@ -316,6 +305,9 @@ export const ConcernementsStore = defineStore({
|
||||
}
|
||||
});
|
||||
},
|
||||
setConcernementMapItem (id, o) {
|
||||
this.concernementsByID[id].map_item = o;
|
||||
},
|
||||
resetConcernementOpened () {
|
||||
this.opened_concernement = null;
|
||||
this.openCloseConcernements();
|
||||
|
||||
Reference in New Issue
Block a user