From 2ef0cbc76cd67f9cf02ea5f94d0e2f2e66cc56b1 Mon Sep 17 00:00:00 2001 From: Mathias Chouet <mathias.chouet@irstea.fr> Date: Mon, 8 Jun 2020 11:32:07 +0200 Subject: [PATCH] PreBarrage: sort graph nodes to prevent lines crossings --- src/app/components/pb-schema/pb-schema.component.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/components/pb-schema/pb-schema.component.ts b/src/app/components/pb-schema/pb-schema.component.ts index 25cee4728..cd7ad1415 100644 --- a/src/app/components/pb-schema/pb-schema.component.ts +++ b/src/app/components/pb-schema/pb-schema.component.ts @@ -266,6 +266,12 @@ export class PbSchemaComponent implements AfterViewInit, AfterContentInit, OnIni // store, to draw later sortedWalls.push(c); } + this.existingWalls[basinsPair]++; + // draw wall Node + def.push(`${c.uid}["${this.itemDesription(c)}"]`); // square edges + def.push(`class ${c.uid} wall;`); + // draw "arrow" with 2 lines + def.push(`${upstreamBasinId}---${c.uid}-->${downstreamBasinId}`); } // sort then draw walls sortedWalls.sort(this.triCloisonsGaucheDroite); -- GitLab