The values returned by toFixed() are used to pre-fill task dialog's common fields. Fields such as resolution, energy, etc. The dialog's schema for these parameters specify that these fields must be of a number types. When we pre-fill these fields as text string, the dialog will show errors such as:
'Energy' must be a number
Note, this error will be displayed on first validation run of the dialog. That is first when user starts editing the fields.
Converting return values to number solves this problem.
The values returned by toFixed() are used to pre-fill task dialog's common fields. Fields such as resolution, energy, etc. The dialog's schema for these parameters specify that these fields must be of a number types. When we pre-fill these fields as text string, the dialog will show errors such as:
'Energy' must be a number
Note, this error will be displayed on first validation run of the dialog. That is first when user starts editing the fields.
Converting return values to number solves this problem.
Solves issue: https://github.com/mxcube/mxcubeweb/issues/1231