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

#1032 user cannot use Select tool to edit FG opened from file #1051

Merged
merged 5 commits into from
Dec 2, 2021

Conversation

karen-sarkisyan
Copy link
Contributor

@karen-sarkisyan karen-sarkisyan commented Dec 1, 2021

This branch fixes issue #1032

Worth noting:

  • select.js was refactored into a class using TypeScript. Algorithms within methods have not changed significantly.
  • History of previous changes for SelectTool is not shown in GitHub due to filename change and changes of the code (mostly indentation though).

Reason for refactoring: when file is opened, canvas is redrawn. But 'select' tool in Editor refers to an instance of ketcher.editor.render.ctab directly. Thus, it keeps a reference to an older instance of canvas.
This fix makes editor instance to be the only source of truth for the tool.

Further fixes of other tools are needed. I will create task for it.

@karen-sarkisyan karen-sarkisyan changed the title #1032 user cannot edit fg from file #1032 user cannot use Select tool to edit FG opened from file Dec 1, 2021
@karen-sarkisyan karen-sarkisyan linked an issue Dec 1, 2021 that may be closed by this pull request
@karen-sarkisyan karen-sarkisyan marked this pull request as draft December 1, 2021 15:59
@karen-sarkisyan karen-sarkisyan force-pushed the #1032-user-cannot-edit-FG-from-file branch from 49b16ab to 165c352 Compare December 1, 2021 21:26
@karen-sarkisyan karen-sarkisyan marked this pull request as ready for review December 2, 2021 07:52
@karen-sarkisyan karen-sarkisyan marked this pull request as draft December 2, 2021 10:25
@karen-sarkisyan karen-sarkisyan marked this pull request as ready for review December 2, 2021 11:45
@AndreiMazol AndreiMazol merged commit 0d87dd3 into release/2.4 Dec 2, 2021
@AndreiMazol AndreiMazol deleted the #1032-user-cannot-edit-FG-from-file branch December 2, 2021 14:45
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.

User is able to edit FG that was opened from file
2 participants