cheminfo / nmrium

React component to display and process nuclear magnetic resonance (NMR) spectra.
https://docs.nmrium.org
MIT License
55 stars 26 forks source link

Bug with prediction and expanded protons #3229

Closed lpatiny closed 2 months ago

lpatiny commented 2 months ago

If you predict ethylbenzene and check the COSY.

The hover correctly highlight the corresponding atoms (carbon).

But if you expand the hydrogens (shift + click on the atom) the highlight does not work anymore, even if you collapse again.

2024-09-11 10 12 56

@hamed-musallam Could you have a look at this bug. It could be on my side in react-ocl-nmr

hamed-musallam commented 2 months ago

@lpatiny it appears that due to changes in the rendering and positioning of the molecule structure in the OLCnmr component, the setHoverAtom function is no longer being triggered (The event is not yet attached when the mouse moves away from the atom), which causes the hover effect on 2D signals to persist. As a temporary workaround, we can call the function responsible for handling the mouse leave action when Shift + Click is used to resolve this issue.