Change the way we calculate 2d levels
- Dominant language
- TypeScript
- Stars
- 80
- Forks
- 34
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 36
Description
Please use the branch 'levels' for this purpose.
We have currently the following options:

wheel and shiftWheel should change the corresponding contourLevels[0] parameter
The only way to change the contourLevels[1] if using the slider in the spectrum option panel.
We precalculate once for ever the allowed: https://github.com/cheminfo/nmr-displayer/blob/c8793c1fc279fd98572b031d741f33b6e31f00de/src/data/data2d/Processing2D.js#L44-L45
When we want to calculate the _range in https://github.com/cheminfo/nmr-displayer/blob/c8793c1fc279fd98572b031d741f33b6e31f00de/src/data/data2d/Processing2D.js#L138-L143 we use the values from this.allowedLevels and the 'numberOfLayers' between contourLevels[0] and contourLevels[1]. if there is not enough levels we limit the number of displayed levels.
Once this is done and because now only a limited number of levels is allowed we can cache the result of the 101 possible level values so that we don't need to recalculate them each time.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.