epam / ketcher

Web-based molecule sketcher
https://lifescience.opensource.epam.com/ketcher/demo.html
Apache License 2.0
488 stars 166 forks source link

Dragging a FG on a FG connected to an atom make overlap instead of replace #2268

Open Zhirnoff opened 1 year ago

Zhirnoff commented 1 year ago

Steps to Reproduce

  1. Open Ketcher
  2. Add Functional Group connected with atom on canvas
  3. Select another Functional Group and add to canvas
  4. Choose 'Selection tool' and drag FG to Functional Group connected with atom and try to connect to FG
  5. Choose 'Selection tool' and drag FG to Functional Group connected with atom and try to connect to atom

Actual behavior 1) Connection to Functional Group: FG overlap FG 2) Connection to atom: Two functional groups are formed after connection to atom. Sometimes four Note: Pay attention to the highlight of the atoms and bond - they start to glow when the FG is just brought up to them

Expected behavior 1) Connection to Functional Group: FG replace FG 2) Connection to atom: FG replace atom Note: Pay attention to the highlight of the atoms and bond - they start to glow when the FG is just brought up to them

Screenshots

https://user-images.githubusercontent.com/62464241/220975662-3f0c1d57-77c9-494a-9e22-65dd70509b73.mp4

Desktop (please complete the following information):

Ketcher version Version 2.8.0-rc.4

yuleicul commented 1 year ago

A note: merging behaviors are different after several undo. See: #2302