Skip to content
Snippets Groups Projects
Commit 6247b792 authored by David Dorchies's avatar David Dorchies
Browse files

Correction bug introduit dans le merge dd33cab1

parent dd33cab1
No related branches found
No related tags found
No related merge requests found
...@@ -152,11 +152,7 @@ ...@@ -152,11 +152,7 @@
}, },
{ {
"type": "options", "type": "options",
<<<<<<< HEAD
"defaultNodeType": "SectionTrapeze",
=======
"defaultNodeType": "SectionRectangle", "defaultNodeType": "SectionRectangle",
>>>>>>> 043f86cae47e4d5e65ba5c91b9e4ede45aff2428
"idCal": "Q", "idCal": "Q",
"sectionSourceId": "fs_section" "sectionSourceId": "fs_section"
} }
......
...@@ -260,11 +260,7 @@ ...@@ -260,11 +260,7 @@
}, },
{ {
"type": "options", "type": "options",
<<<<<<< HEAD
"defaultNodeType": "SectionTrapeze",
=======
"defaultNodeType": "SectionRectangle", "defaultNodeType": "SectionRectangle",
>>>>>>> 043f86cae47e4d5e65ba5c91b9e4ede45aff2428
"sectionSourceId": "select_section", "sectionSourceId": "select_section",
"targetSelectId": "select_target", "targetSelectId": "select_target",
"methodSelectId": "select_resolution" "methodSelectId": "select_resolution"
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
"Q": "Débit amont", "Q": "Débit amont",
"Yaval": "Tirant d'eau imposé à l'aval", "Yaval": "Tirant d'eau imposé à l'aval",
"Yamont": "Tirant d'eau imposé à l'amont", "Yamont": "Tirant d'eau imposé à l'amont",
"fs_param_calc": "Paramètres de calcul",
"Dx": "Pas de discrétisation", "Dx": "Pas de discrétisation",
"Pr": "Précision de calcul des cotes", "Pr": "Précision de calcul des cotes",
"select_resolution": "Méthode de résolution", "select_resolution": "Méthode de résolution",
......
...@@ -274,11 +274,7 @@ ...@@ -274,11 +274,7 @@
}, },
{ {
"type": "options", "type": "options",
<<<<<<< HEAD
"defaultNodeType": "SectionTrapeze",
=======
"defaultNodeType": "SectionRectangle", "defaultNodeType": "SectionRectangle",
>>>>>>> 043f86cae47e4d5e65ba5c91b9e4ede45aff2428
"sectionSourceId": "select_section", "sectionSourceId": "select_section",
"targetSelectId": "select_target" "targetSelectId": "select_target"
} }
......
...@@ -15,15 +15,17 @@ export class FormComputeFixedVar extends FormCompute { ...@@ -15,15 +15,17 @@ export class FormComputeFixedVar extends FormCompute {
} }
private getVariatedParameter(): NgParameter { private getVariatedParameter(): NgParameter {
let res = this._formBase.getDisplayedParamFromState(ParamRadioConfig.VAR); const res = this._formBase.getDisplayedParamFromState(ParamRadioConfig.VAR);
if (res !== undefined) if (res !== undefined) {
return res; return res;
}
const pms = this._formBase.getDisplayedParamListFromState(ParamRadioConfig.LINK); const pms = this._formBase.getDisplayedParamListFromState(ParamRadioConfig.LINK);
for (const p of pms) for (const p of pms) {
if (p.paramDefinition.hasMultipleValues) if (p.paramDefinition.hasMultipleValues) {
return p; return p;
}
}
return undefined; return undefined;
} }
...@@ -43,24 +45,24 @@ export class FormComputeFixedVar extends FormCompute { ...@@ -43,24 +45,24 @@ export class FormComputeFixedVar extends FormCompute {
protected compute() { protected compute() {
const nub: Nub = this._formBase.currentSessionNub.nub; const nub: Nub = this._formBase.currentSessionNub.nub;
let computePrec: number;
if (this._formBase.hasParameter("Pr")) {
computePrec = this._formBase.getParameterValue("Pr"); // précision de calcul
}
if (this._formBase.hasParameter("Pr")) const computedParam: NgParameter = this.getComputedParameter();
var computePrec: number = this._formBase.getParameterValue("Pr"); // précision de calcul
let computedParam: NgParameter = this.getComputedParameter();
this.formResult.addFixedParameters(); this.formResult.addFixedParameters();
let varParam: NgParameter = this.getVariatedParameter(); const varParam: NgParameter = this.getVariatedParameter();
if (varParam == undefined) { if (varParam === undefined) {
// pas de paramètre à varier // pas de paramètre à varier
const res: Result = this.runNubCalc(nub, computedParam, computePrec); const res: Result = this.runNubCalc(nub, computedParam, computePrec);
this.formResult.fixedResults.result = res; this.formResult.fixedResults.result = res;
this.formResult.fixedResults.calculatedParameter = computedParam; this.formResult.fixedResults.calculatedParameter = computedParam;
} } else {
else {
// il y a un paramètre à varier // il y a un paramètre à varier
const res: Result = this.runNubCalc(nub, computedParam, computePrec); const res: Result = this.runNubCalc(nub, computedParam, computePrec);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment