diff --git a/src/app/calculators/regime-uniforme/regime-uniforme.config.json b/src/app/calculators/regime-uniforme/regime-uniforme.config.json index 7958e3221f0b5958f8424449999d579a02ce83f9..32b228708f7e6cf71005f670a1e06626f8f53244 100644 --- a/src/app/calculators/regime-uniforme/regime-uniforme.config.json +++ b/src/app/calculators/regime-uniforme/regime-uniforme.config.json @@ -152,11 +152,7 @@ }, { "type": "options", -<<<<<<< HEAD - "defaultNodeType": "SectionTrapeze", -======= "defaultNodeType": "SectionRectangle", ->>>>>>> 043f86cae47e4d5e65ba5c91b9e4ede45aff2428 "idCal": "Q", "sectionSourceId": "fs_section" } diff --git a/src/app/calculators/remous/remous.config.json b/src/app/calculators/remous/remous.config.json index c0b782504b8ce68289e29c9dddfb523ae8a40fe3..8fcdf1c4d171b8d9293ff1c1c96ae76a11d172f0 100644 --- a/src/app/calculators/remous/remous.config.json +++ b/src/app/calculators/remous/remous.config.json @@ -260,11 +260,7 @@ }, { "type": "options", -<<<<<<< HEAD - "defaultNodeType": "SectionTrapeze", -======= "defaultNodeType": "SectionRectangle", ->>>>>>> 043f86cae47e4d5e65ba5c91b9e4ede45aff2428 "sectionSourceId": "select_section", "targetSelectId": "select_target", "methodSelectId": "select_resolution" diff --git a/src/app/calculators/remous/remous.fr.json b/src/app/calculators/remous/remous.fr.json index b3086abb4d42ac1fc5a26183795fa4fc6e135fa0..98f5971f3d6c31d97942aab833409a170248a2f7 100644 --- a/src/app/calculators/remous/remous.fr.json +++ b/src/app/calculators/remous/remous.fr.json @@ -23,7 +23,6 @@ "Q": "Débit amont", "Yaval": "Tirant d'eau imposé à l'aval", "Yamont": "Tirant d'eau imposé à l'amont", - "fs_param_calc": "Paramètres de calcul", "Dx": "Pas de discrétisation", "Pr": "Précision de calcul des cotes", "select_resolution": "Méthode de résolution", diff --git a/src/app/calculators/section-param/section-param.config.json b/src/app/calculators/section-param/section-param.config.json index ea4e990e7344226629ed3da2c8e7ca8134a288b9..9268cc7e34489f0b3e498dc93efe2063bc9ae393 100644 --- a/src/app/calculators/section-param/section-param.config.json +++ b/src/app/calculators/section-param/section-param.config.json @@ -274,11 +274,7 @@ }, { "type": "options", -<<<<<<< HEAD - "defaultNodeType": "SectionTrapeze", -======= "defaultNodeType": "SectionRectangle", ->>>>>>> 043f86cae47e4d5e65ba5c91b9e4ede45aff2428 "sectionSourceId": "select_section", "targetSelectId": "select_target" } diff --git a/src/app/formulaire/definition/form-compute-fixedvar.ts b/src/app/formulaire/definition/form-compute-fixedvar.ts index 9285a6704e1367ad8523b7738120f08ae4924fee..837e1eea9ba1a4cba24574539c6b7949f8c404de 100644 --- a/src/app/formulaire/definition/form-compute-fixedvar.ts +++ b/src/app/formulaire/definition/form-compute-fixedvar.ts @@ -15,15 +15,17 @@ export class FormComputeFixedVar extends FormCompute { } private getVariatedParameter(): NgParameter { - let res = this._formBase.getDisplayedParamFromState(ParamRadioConfig.VAR); - if (res !== undefined) + const res = this._formBase.getDisplayedParamFromState(ParamRadioConfig.VAR); + if (res !== undefined) { return res; + } const pms = this._formBase.getDisplayedParamListFromState(ParamRadioConfig.LINK); - for (const p of pms) - if (p.paramDefinition.hasMultipleValues) + for (const p of pms) { + if (p.paramDefinition.hasMultipleValues) { return p; - + } + } return undefined; } @@ -43,24 +45,24 @@ export class FormComputeFixedVar extends FormCompute { protected compute() { 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")) - var computePrec: number = this._formBase.getParameterValue("Pr"); // précision de calcul - - let computedParam: NgParameter = this.getComputedParameter(); + const computedParam: NgParameter = this.getComputedParameter(); this.formResult.addFixedParameters(); - let varParam: NgParameter = this.getVariatedParameter(); + const varParam: NgParameter = this.getVariatedParameter(); - if (varParam == undefined) { + if (varParam === undefined) { // pas de paramètre à varier const res: Result = this.runNubCalc(nub, computedParam, computePrec); this.formResult.fixedResults.result = res; this.formResult.fixedResults.calculatedParameter = computedParam; - } - else { + } else { // il y a un paramètre à varier const res: Result = this.runNubCalc(nub, computedParam, computePrec);