Commit 3b3fc51d authored by Grand Francois's avatar Grand Francois
Browse files

#47 : ParallelStructure.addStructure() : ajout d'un paramètre pour ajouter la...

 #47 : ParallelStructure.addStructure() : ajout d'un paramètre pour ajouter la structure après un indice donné
Showing with 6 additions and 2 deletions
+6 -2
...@@ -58,9 +58,13 @@ export class ParallelStructure extends Nub { ...@@ -58,9 +58,13 @@ export class ParallelStructure extends Nub {
/** /**
* Ajout d'une structure en parallèle * Ajout d'une structure en parallèle
* @param structure La structure à rajouter * @param structure La structure à rajouter
* @param after position après laquelle insérer la structure, à la fin sinon
*/ */
public addStructure(structure: Structure) { public addStructure(structure: Structure, after?: number) {
this.structures.push(structure); if (after !== undefined)
this.structures.splice(after + 1, 0, structure);
else
this.structures.push(structure);
} }
/** /**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment