Add check for `normalization_factors` for the `Normalize intensities` optino...
Merged
requested to merge 1663-dos-normalization-menu-even-when-normalization-is-not-possible into develop
All threads resolved!
Add check for normalization_factors
for the Normalize intensities
option under the DOS kebab menu
Closes #1663 (closed)
Merge request reports
Activity
requested review from @himanel1
assigned to @ndaelman
I keep getting
Error: Uncaught [Error: The given unit system does not contain the required unit definitions for converting undefined with dimension energy.]
Testing further, when adding
console.log
to print out theDOS.propTypes
, the properties get printed 3 times. For the 1st time only,data
is notablyundefined
, which might explain the error message. Is there any way to delay the output or mock the other requirements that<DOS>
is waiting for?Also interesting,
className
remainsundefined
throughout.added 1 commit
- 4377e143 - Moved the unit config to the read using a hook in DOS.js, added test for...
- Resolved by Lauri Himanen
I pushed a new commit that fixed a few things:
- Now the component uses a hook to fetch the unit settings instead of the user having to pass it down. This makes testing it much easier and is aligned with what we do with other visualization components.
- I made it so that the options menu is always visible, but the action may be disabled. This way the button layout stays the same (consistency) and it is aligned with what we do with e.g. the structure viewer.
- I added two tests: one that checks that the normalization option is enabled when factors are given, and another one that checks that the option is disabled when the factors are not set.
mentioned in commit 68dc879e
Please register or sign in to reply