diff --git a/src/structure/parallel_structure.ts b/src/structure/parallel_structure.ts index d4dc9749f93e70512ae7b5b4500f012226feaa5b..6184f7f42b17d87f77c2448318b54c65f5a98705 100644 --- a/src/structure/parallel_structure.ts +++ b/src/structure/parallel_structure.ts @@ -58,9 +58,13 @@ export class ParallelStructure extends Nub { /** * Ajout d'une structure en parallèle * @param structure La structure à rajouter + * @param after position après laquelle insérer la structure, à la fin sinon */ - public addStructure(structure: Structure) { - this.structures.push(structure); + public addStructure(structure: Structure, after?: number) { + if (after !== undefined) + this.structures.splice(after + 1, 0, structure); + else + this.structures.push(structure); } /**