refactoring: renamed allSuperpositions_byid by allSuperpositions_bycids
This commit is contained in:
12
src/App.vue
12
src/App.vue
@@ -34,7 +34,7 @@ export default {
|
||||
'concernements',
|
||||
'concernements_loaded',
|
||||
'concernementsByID',
|
||||
'allSuperpositions_byid',
|
||||
'allSuperpositions_bycids',
|
||||
'allMapItems_byid',
|
||||
'opened_recit']),
|
||||
},
|
||||
@@ -55,14 +55,14 @@ export default {
|
||||
// parseSuperposedMapitemsClones () {
|
||||
// let clones = [];
|
||||
// // loop through all superposition grouped by concernements couples
|
||||
// for(let [couple_id, superpositions] of Object.entries(this.allSuperpositions_byid)){
|
||||
// for(let [couple_id, superpositions] of Object.entries(this.allSuperpositions_bycids)){
|
||||
// // loop through all superpositions for one concernement couple and mark the first as NOT cloned and clone the others and mark them as cloned
|
||||
// let i = 0;
|
||||
// for(let [superposition_id, superposition] of Object.entries(superpositions)){
|
||||
// i++
|
||||
// if (i === 1) {
|
||||
// // first superposition of the couple is not cloned
|
||||
// this.allSuperpositions_byid[couple_id][superposition_id].cloned = false;
|
||||
// this.allSuperpositions_bycids[couple_id][superposition_id].cloned = false;
|
||||
// continue;
|
||||
// }
|
||||
// // following superpositions of the couple generate concernement map_item clones
|
||||
@@ -77,13 +77,13 @@ export default {
|
||||
// superposition_id: superposition_id
|
||||
// })
|
||||
|
||||
// this.allSuperpositions_byid[couple_id][superposition_id].cloned = true;
|
||||
// this.allSuperpositions_bycids[couple_id][superposition_id].cloned = true;
|
||||
// }
|
||||
// }
|
||||
// this.superposed_cloned_mapitems = clones;
|
||||
// },
|
||||
parseMapitems() {
|
||||
let couple_ids = Object.keys(this.allSuperpositions_byid);
|
||||
let couple_ids = Object.keys(this.allSuperpositions_bycids);
|
||||
console.log('App couple_ids', couple_ids);
|
||||
// loop through all concernement
|
||||
for(let [concernement_id, concernement] of Object.entries(this.concernementsByID)){
|
||||
@@ -101,7 +101,7 @@ export default {
|
||||
if (concernement.id === parseInt(cids[1]) || concernement.id === parseInt(cids[2])) {
|
||||
let i = 0;
|
||||
// loop through all superpositions of couple
|
||||
for(let [superposition_id, superposition] of Object.entries(this.allSuperpositions_byid[couple_id])){
|
||||
for(let [superposition_id, superposition] of Object.entries(this.allSuperpositions_bycids[couple_id])){
|
||||
i++;
|
||||
if (!mapitem.superposition_ids.length) {
|
||||
// if main map item does not yet have a superposition use it and alter his id (for matter constraints)
|
||||
|
||||
Reference in New Issue
Block a user