Skip to content
Snippets Groups Projects
Commit 086a5183 authored by mathias.chouet's avatar mathias.chouet
Browse files

Add empty 1st entry to Lechapt-Calmon materials (normalization for GUI forms)

parent 547353b0
No related branches found
No related tags found
No related merge requests found
/** materials for Lechapt-Calmon */
export enum LCMaterial {
NONE,
UnlinedCastIronCoarseConcrete,
CastSteelOrUncoatedCoarseConcrete,
CastSteelOrCementCoating,
......
......@@ -143,10 +143,12 @@ export class LechaptCalmon extends Nub implements Observer {
*/
private applyMaterialPreset() {
const m = this.properties.getPropValue("material");
const values = LechaptCalmon._materials[m];
this.prms.L.singleValue = values.L;
this.prms.M.singleValue = values.M;
this.prms.N.singleValue = values.N;
if (m > 0) {
const values = LechaptCalmon._materials[m - 1]; // "0" means no preset
this.prms.L.singleValue = values.L;
this.prms.M.singleValue = values.M;
this.prms.N.singleValue = values.N;
}
}
}
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