-
Notifications
You must be signed in to change notification settings - Fork 177
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
#2276 Click & drag an 'Atom' on FG, Salts and Solvents, FG connected with Atom forms many atoms #2577
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @VasilevDO , it looks really cool to me in the sense that the bond-adding action will be reverted after hovering back! 👍
Unfortunately, I found a small problem which seems not to behave correctly, according to
Expected behavior
...
For Salt and Solvents: Atom appears where the left mouse button was released without a connection
...
if (dragCtx.item.id === ci.id) { | ||
if ( | ||
ci.map === 'functionalGroups' && | ||
FunctionalGroup.isContractedFunctionalGroup(ci.id, functionalGroups) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's fun that I have the same logic in my PR :) I think we need to extract this into a separate function and reuse it.
https://github.com/epam/ketcher/pull/2580/files#diff-ee62e3d2a7eb8e9230e2d13e3cfe44e4ea9ea805a61f971355d38aab66dda856R62
|
||
const ciFunctionalGroupName = | ||
ci?.map === 'functionalGroups' | ||
? molecule.functionalGroups.get(ci?.id)?.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we write here "ci?.map === 'functionalGroups' && molecule.functionalGroups.get(ci?.id)?.name"?
Closes #2276
Changes: