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

#2660 Can't attach copied or cutted Functional Group to atoms of structure #2713

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

kaluginserg
Copy link
Collaborator

@kaluginserg kaluginserg commented May 30, 2023

Resolves #2660

What was done:

  • Tool Paste
    • removed all logic related to drag functionality (it didn't work, so without proper tests and naming it's just trash)
    • removed flag isSingleContractedGroup as it is not working as expected, finally in the current implementation it works only when we past group on group, but if we try to past Atom on group or structure on structure, or group on atom - it's not working. So the decision is to have it as is, and later fix all issues with Past tool at once with the new implmementation.
  • add the helper function filterSlatAndSolventFromMerge() in the tools folder. It's the short-term solution as in the better way it must be inside the ketcher-core closest.merge (the same as findCloseMerge), and removed from the tools level.
  • small refactoring for related files (adding typescript types and interfaces)

How it works now (On the video: begining from Template, then using select tool, and after that using Paste tool):

Screen.Recording.2023-06-01.at.14.03.31.mov

It is still a difference in the behavior of the tools:

  • Template Tool - the group is merged as collapsed
  • Select tool - the group is merged as expanded
  • Paste tool - the group is merged as expanded

@kaluginserg kaluginserg self-assigned this May 30, 2023
@kaluginserg kaluginserg marked this pull request as ready for review May 30, 2023 12:10
@auto-assign auto-assign bot requested review from gairon and Nitvex May 30, 2023 12:10
@kaluginserg kaluginserg changed the title 2660 fix paste tool and functional group to atoms of structure 2660 Can't attach copied or cutted Functional Group to atoms of structure May 31, 2023
@kaluginserg kaluginserg marked this pull request as draft June 2, 2023 05:20
@kaluginserg kaluginserg changed the title 2660 Can't attach copied or cutted Functional Group to atoms of structure #2660 Can't attach copied or cutted Functional Group to atoms of structure Jun 2, 2023
@kaluginserg kaluginserg changed the title #2660 Can't attach copied or cutted Functional Group to atoms of structure 2660 Can't attach copied or cutted Functional Group to atoms of structure Jun 2, 2023
@kaluginserg kaluginserg changed the title 2660 Can't attach copied or cutted Functional Group to atoms of structure #2660 Can't attach copied or cutted Functional Group to atoms of structure Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't attach copied or cut Functional Group to atoms of structure
2 participants