You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hover over one atom of a functional group and try to erase it
Expected behavior
Erase action fails. Modal is shown with suggestion to remove FG abbreviation before changing it.
Actual behavior
Atom is erased
Same happens with other tools (whichever tool is active when file opens) except for Select tool, which was fixed in PR #1051
Suggested fix and refactoring for other tools is:
Make sure tool's constructor function does not refer to editor.render.ctab and its nested objects, because it creates a reference to an older state of canvas when new canvas is created on file open.
Use ES6 class syntax
Use TypeScript
The text was updated successfully, but these errors were encountered:
* Renamed tools for refactoring to .ts extension
* Refactor Eraser tool
* Refactor Bond tool
* Refactor Chain tool
* Refactor Charge tool
* Refactor Rotate tool
* Refactor Atom tool
* Refactor APoint tool
* Refactored template tool into class with correct reference to canvas
* Refactored sgroup tool into class with correct reference to canvas
* Refactored RGroupFragment tool into class with correct reference to canvas
* Refactored RGroupAtom tool into class with correct reference to canvas
* Refactored Paste tool into class with correct reference to canvas
* Refactored Attach tool into class with correct reference to canvas
Co-authored-by: Viktoriia Fedotkina <[email protected]>
All Editor tools should be checked to make sure they work correctly when a file is opened.
Example issue is #1032 , which can be reproduced for eraser, bond and other tools. For example:
Expected behavior
Erase action fails. Modal is shown with suggestion to remove FG abbreviation before changing it.
Actual behavior
Atom is erased
Same happens with other tools (whichever tool is active when file opens) except for Select tool, which was fixed in PR #1051
Suggested fix and refactoring for other tools is:
editor.render.ctab
and its nested objects, because it creates a reference to an older state of canvas when new canvas is created on file open.The text was updated successfully, but these errors were encountered: