Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unhandled error in ZonesActions #2466

Closed
targos opened this issue Jun 26, 2023 · 5 comments · Fixed by #2472
Closed

unhandled error in ZonesActions #2466

targos opened this issue Jun 26, 2023 · 5 comments · Fixed by #2472
Assignees
Labels
bug Something isn't working

Comments

@targos
Copy link
Member

targos commented Jun 26, 2023

Cannot read properties of undefined (reading 'maxX') / l is undefined

{
  source: 'webpack://_N_E/node_modules/nmrium/lib/component/reducer/Reducer.js',
  line: 348,
  column: 63,
  name: 'draft'
}
{
  source: 'webpack://_N_E/node_modules/nmrium/lib/component/reducer/actions/ZonesActions.js',
  line: 64,
  column: 38,
  name: null
}
{
  source: 'webpack://_N_E/node_modules/nmrium/lib/data/data2d/Spectrum2D/zones/detectZones.js',
  line: 4,
  column: 35,
  name: 'datum'
}
{
  source: 'webpack://_N_E/node_modules/nmrium/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js',
  line: 18,
  column: 0,
  name: 'spectrum'
}
{
  source: 'webpack://_N_E/node_modules/nmrium/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js',
  line: 47,
  column: 0,
  name: 'data'
}
@targos targos added the bug Something isn't working label Jun 26, 2023
@hamed-musallam
Copy link
Member

this bug happen because the user visualize 2d FT spectra and then select the zone detection tool then switch to 2d Fid so the zone detection options panel still opened and he try to make zone detection which should not work.

in this case, what do we have to do?

hide the panel if the selected 2d spectrum is not FT or check before making the zone detection and display a message if it is not FT

@hamed-musallam hamed-musallam self-assigned this Jun 26, 2023
@hamed-musallam
Copy link
Member

@lpatiny
WDT?

@lpatiny
Copy link
Member

lpatiny commented Jun 26, 2023

If it is easy to implement, I think when changing the spectrum we could systematically reset the tool to zoom (this means changing the spectrum for the same nucleus or changing the nucleus).

@targos
Copy link
Member Author

targos commented Jun 26, 2023

I'm able to reproduce without using the zone detection tool.

Just go to https://dev.nmrium.org/#/SamplesDashboard/d3ubedj4/Viewcytisine2ddatacytisine2dHMBC_HN_Cytisinjson and click this button in the spectra list:
CleanShot 2023-06-26 at 14 57 41

@hamed-musallam hamed-musallam linked a pull request Jun 26, 2023 that will close this issue
@targos
Copy link
Member Author

targos commented Jun 26, 2023

I think this was actually a duplicate of #2411 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants