diff --git a/src/app/calculators/cloisons/cloisons.config.json b/src/app/calculators/cloisons/cloisons.config.json index 52e618a7776c0b9b418bbac2018bb3794b1bde7b..f661cde4f9606ad48aa1c964c6500304fed410dd 100644 --- a/src/app/calculators/cloisons/cloisons.config.json +++ b/src/app/calculators/cloisons/cloisons.config.json @@ -64,44 +64,37 @@ { "type": "input", "id": "h1", - "unit": "m", - "nodeType": "StructureRectangle" + "unit": "m" }, { "type": "input", "id": "L", - "unit": "m", - "nodeType": "StructureRectangle" + "unit": "m" }, { "type": "input", "id": "Cd", - "unit": "", - "nodeType": "StructureRectangle" + "unit": "" }, { "type": "input", "id": "S", - "unit": "", - "nodeType": "StructureRectangle" + "unit": "" }, { "type": "input", "id": "alpha2", - "unit": "", - "nodeType": "StructureRectangle" + "unit": "" }, { "type": "input", "id": "BT", - "unit": "", - "nodeType": "StructureRectangle" + "unit": "" }, { "type": "input", "id": "ZT", - "unit": "", - "nodeType": "StructureRectangle" + "unit": "" } ] }, diff --git a/src/app/calculators/dever/dever.config.json b/src/app/calculators/dever/dever.config.json index c3378c6b0b541d5015141fff5fc99666be5cab19..873c359657055c62604c4f9fbe4cb6a82a91513f 100644 --- a/src/app/calculators/dever/dever.config.json +++ b/src/app/calculators/dever/dever.config.json @@ -52,38 +52,32 @@ { "type": "input", "id": "ZDV", - "unit": "m", - "nodeType": "StructureRectangle" + "unit": "m" }, { "type": "input", "id": "L", - "unit": "m", - "nodeType": "StructureRectangle" + "unit": "m" }, { "type": "input", "id": "Cd", - "unit": "", - "nodeType": "StructureRectangle" + "unit": "" }, { "type": "input", "id": "alpha2", - "unit": "°", - "nodeType": "StructureRectangle" + "unit": "°" }, { "type": "input", "id": "BT", - "unit": "m", - "nodeType": "StructureRectangle" + "unit": "m" }, { "type": "input", "id": "ZT", - "unit": "m", - "nodeType": "StructureRectangle" + "unit": "m" } ] }, diff --git a/src/app/calculators/parallel-structures/parallel-structures.config.json b/src/app/calculators/parallel-structures/parallel-structures.config.json index 4a0b8a5806586e4c7a50165ded1ac86956c721f1..a477054dfa8469025eee330660cec468c1d0430a 100644 --- a/src/app/calculators/parallel-structures/parallel-structures.config.json +++ b/src/app/calculators/parallel-structures/parallel-structures.config.json @@ -45,80 +45,67 @@ { "type": "input", "id": "ZDV", - "unit": "m", - "nodeType": "StructureRectangle" + "unit": "m" }, { "type": "input", "id": "L", - "unit": "m", - "nodeType": "StructureRectangle" + "unit": "m" }, { "type": "input", "id": "W", - "nodeType": "StructureRectangle", "unit": "m" }, { "type": "input", "id": "CdWSL", - "unit": "", - "nodeType": "StructureRectangle" + "unit": "" }, { "type": "input", "id": "CdWR", - "unit": "", - "nodeType": "StructureRectangle" + "unit": "" }, { "type": "input", "id": "CdGR", - "unit": "", - "nodeType": "StructureRectangle" + "unit": "" }, { "type": "input", "id": "CdT", - "unit": "", - "nodeType": "StructureRectangle" + "unit": "" }, { "type": "input", "id": "alpha", - "unit": "", - "nodeType": "StructureRectangle" + "unit": "" }, { "type": "input", "id": "beta", - "unit": "", - "nodeType": "StructureRectangle" + "unit": "" }, { "type": "input", "id": "ZRAM", - "unit": "m", - "nodeType": "StructureRectangle" + "unit": "m" }, { "type": "input", "id": "alpha2", - "unit": "°", - "nodeType": "StructureRectangle" + "unit": "°" }, { "type": "input", "id": "BT", - "unit": "m", - "nodeType": "StructureRectangle" + "unit": "m" }, { "type": "input", "id": "ZT", - "unit": "m", - "nodeType": "StructureRectangle" + "unit": "m" } ] }, diff --git a/src/app/calculators/regime-uniforme/regime-uniforme.config.json b/src/app/calculators/regime-uniforme/regime-uniforme.config.json index ac65a0ea103d3b1ada2455bd8629718355a4c39c..14e321955f77f146aa301f3972529ff9965d67a6 100644 --- a/src/app/calculators/regime-uniforme/regime-uniforme.config.json +++ b/src/app/calculators/regime-uniforme/regime-uniforme.config.json @@ -12,38 +12,27 @@ { "type": "input", "id": "LargeurFond", - "nodeType": "SectionTrapeze", "unit": "m" }, { "type": "input", "id": "Fruit", - "nodeType": "SectionTrapeze", "unit": "m/m" }, { "type": "input", "id": "LargeurBerge", - "nodeType": "SectionRectangle", "unit": "m" }, { "type": "input", "id": "D", - "nodeType": "SectionCercle", "unit": "m" }, { "type": "input", "id": "k", - "nodeType": "SectionPuissance", "unit": "" - }, - { - "type": "input", - "id": "LargeurBerge", - "nodeType": "SectionPuissance", - "unit": "m" } ] }, diff --git a/src/app/calculators/remous/remous.config.json b/src/app/calculators/remous/remous.config.json index 172802242792d17f008d5058443b9bad62bc5e20..18809cd8410bd4ab4e13e8126c4ddaac1dde6c16 100644 --- a/src/app/calculators/remous/remous.config.json +++ b/src/app/calculators/remous/remous.config.json @@ -12,38 +12,27 @@ { "type": "input", "id": "LargeurFond", - "nodeType": "SectionTrapeze", "unit": "m" }, { "type": "input", "id": "Fruit", - "nodeType": "SectionTrapeze", "unit": "m/m" }, { "type": "input", "id": "LargeurBerge", - "nodeType": "SectionRectangle", "unit": "m" }, { "type": "input", "id": "D", - "nodeType": "SectionCercle", "unit": "m" }, { "type": "input", "id": "k", - "nodeType": "SectionPuissance", "unit": "" - }, - { - "type": "input", - "id": "LargeurBerge", - "nodeType": "SectionPuissance", - "unit": "m" } ] }, diff --git a/src/app/calculators/section-param/section-param.config.json b/src/app/calculators/section-param/section-param.config.json index acb801414d8d66514c56acb20fe93175672a8829..d1b1f4a128dc3676a9f19d985bcf53ed20e698bc 100644 --- a/src/app/calculators/section-param/section-param.config.json +++ b/src/app/calculators/section-param/section-param.config.json @@ -11,39 +11,28 @@ }, { "type": "input", - "id": "LargeurFond", - "unit": "m", - "nodeType": "SectionTrapeze" + "id": "LargeurBerge", + "unit": "m" }, { "type": "input", - "id": "Fruit", - "nodeType": "SectionTrapeze", - "unit": "m/m" + "id": "LargeurFond", + "unit": "m" }, { "type": "input", - "id": "LargeurBerge", - "unit": "m", - "nodeType": "SectionRectangle" + "id": "Fruit", + "unit": "m/m" }, { "type": "input", "id": "D", - "unit": "m", - "nodeType": "SectionCercle" + "unit": "m" }, { "type": "input", "id": "k", - "unit": "", - "nodeType": "SectionPuissance" - }, - { - "type": "input", - "id": "LargeurBerge", - "unit": "m", - "nodeType": "SectionPuissance" + "unit": "" } ] }, diff --git a/src/app/formulaire/fieldset.ts b/src/app/formulaire/fieldset.ts index 9f112fb4c10e97848c219443217647e41d6ba8f3..2bd0a9434427a5df0b001e4c69cc826876947f4f 100644 --- a/src/app/formulaire/fieldset.ts +++ b/src/app/formulaire/fieldset.ts @@ -116,29 +116,16 @@ export class FieldSet extends FormulaireElement implements Observer { */ private parse_input(json: {}, default_radio_config: string): NgParameter { const input_id: string = json["id"]; - let res: NgParameter; - - // @TODO tabarnak !? - const nt: string = json["nodeType"]; - const nodeType: ComputeNodeType = nt ? ComputeNodeType[nt] : this.getPropValue("nodeType"); - - if (nodeType === this.getPropValue("nodeType")) { // si le nodeType du paramètre est le même que celui du fieldset - let nubParam: ParamDefinition; - try { - nubParam = this.getNubParamFromSymbol(input_id); - } catch (e) { - console.error(`FieldSet::parse_input : cannot find param from symbol ${input_id}`); - } - if (nubParam) { - res = new NgParameter(nubParam, this); - } - } - - if (res) { + let nubParam: ParamDefinition; + try { + nubParam = this.getNubParamFromSymbol(input_id); + res = new NgParameter(nubParam, this); res.parseConfig(json, { "radioConfig": default_radio_config }); + } catch (e) { + // parameter does not exist in Nub, it's normal, simply do not show it (silent fail) + // console.error(`FieldSet::parse_input : cannot find param from symbol ${input_id}`); } - return res; }