From 04e0fb7b278a74563ff62edff9945506b501c0a3 Mon Sep 17 00:00:00 2001 From: "mathias.chouet" <mathias.chouet@irstea.fr> Date: Thu, 5 Sep 2019 10:18:44 +0200 Subject: [PATCH] PAB profile: plot ZRMB in apron line, along with ZRAM --- .../pab-profile-graph.component.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/app/components/pab-profile-graph/pab-profile-graph.component.ts b/src/app/components/pab-profile-graph/pab-profile-graph.component.ts index a4fe27e1d..1fcbeb2d5 100644 --- a/src/app/components/pab-profile-graph/pab-profile-graph.component.ts +++ b/src/app/components/pab-profile-graph/pab-profile-graph.component.ts @@ -8,7 +8,7 @@ import { ResultsComponent } from "../fixedvar-results/results.component"; import { PabResults } from "../../results/pab-results"; import { IYSeries } from "../../results/y-series"; -import { CloisonAval } from "jalhyd"; +import { CloisonAval, Cloisons } from "jalhyd"; @Component({ selector: "pab-profile-graph", @@ -226,22 +226,29 @@ export class PabProfileGraphComponent extends ResultsComponent { const pabLength = Number(xs[xs.length - 1]) - Number(xs[0]); const pabLength5Pct = (pabLength * 5) / 100; - // 1. fond du machin + // 1. radier (cotes amont et mi-bassin) const dataF: { x: string, y: string }[] = []; const nDigits = this.appSetupService.displayDigits; - // extend upstrem + // extend upstream dataF.push({ x: (Number(xs[0]) - pabLength5Pct).toFixed(nDigits), y: this._results.cloisonsResults[0].resultElement.getValue("ZRAM").toFixed(nDigits) }); // regular walls for (let i = 0; i < this._results.cloisonsResults.length; i++) { + const c = (this._results.result.sourceNub.getChildren()[i] as Cloisons); const cr = this._results.cloisonsResults[i]; const ZRAM = cr.resultElement.getValue("ZRAM"); // any ResultElement will do + const ZRMB = cr.resultElement.getValue("ZRMB"); // any ResultElement will do + const halfLB = c.prms.LB.singleValue / 2; dataF.push({ x: xs[i], y: ZRAM.toFixed(nDigits) }); + dataF.push({ + x: (Number(xs[i]) + halfLB).toFixed(nDigits), + y: ZRMB.toFixed(nDigits) + }); } // downwall const dw = (this._results.cloisonAvalResults.sourceNub as CloisonAval); -- GitLab