Commit c154e476 authored by Mathias Chouet's avatar Mathias Chouet :spaghetti:
Browse files

Fix bug in CourbeRemous

Showing with 4 additions and 3 deletions
+4 -3
...@@ -639,7 +639,6 @@ describe("Class Remous / section rectangulaire :", () => { ...@@ -639,7 +639,6 @@ describe("Class Remous / section rectangulaire :", () => {
compareLog(res.globalLog, expLog); compareLog(res.globalLog, expLog);
}); });
// désactivé suite au changement de format de résultat
it("faible pente, pas de fluvial, torrentiel tronqué, calcul Hs", () => { it("faible pente, pas de fluvial, torrentiel tronqué, calcul Hs", () => {
const prms = new ParamsSectionRectang(undefined, // tirant d'eau const prms = new ParamsSectionRectang(undefined, // tirant d'eau
2.5, // largeur de fond 2.5, // largeur de fond
......
...@@ -481,8 +481,6 @@ export class CourbeRemous extends SectionNub { ...@@ -481,8 +481,6 @@ export class CourbeRemous extends SectionNub {
} }
// Calcul de la variable à calculer // Calcul de la variable à calculer
const tRes: { [key: number]: number } = {};
if (valACal) { if (valACal) {
for (const re of res.resultElements) { for (const re of res.resultElements) {
const rY = re.vCalc; const rY = re.vCalc;
......
...@@ -39,6 +39,10 @@ export class ResultElement { ...@@ -39,6 +39,10 @@ export class ResultElement {
} else if (v !== undefined) { } else if (v !== undefined) {
// assuming key-value map // assuming key-value map
this._values = v; this._values = v;
// assuming 1st value is vCalc
if (Object.keys(v).length > 0) {
this._vCalcSymbol = Object.keys(v)[0];
}
} }
} }
......
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