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

#3986 - Macro: Selected RNA preset not discards when mouse moved on c… #4372

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ test.describe('Peptide library testing', () => {
/*
Test case: Actions with structures https://github.com/epam/ketcher/issues/3986
Description: Selected RNA discards when mouse hovered on canvas and ESC button is clicked.
The test is currently not functioning correctly as the bug has not been fixed
*/
await page.getByTestId('RNA-TAB').click();
await page.getByTestId('C_C_R_P').click();
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions packages/ketcher-core/src/application/editor/tools/RnaPreset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,16 @@ class RnaPresetTool implements Tool {
this.phosphatePreviewRenderer?.show(this.editor.theme);
}
}

hidePreview() {
this.rnaBasePreviewRenderer?.remove();
this.phosphatePreviewRenderer?.remove();
this.sugarPreviewRenderer?.remove();
}

destroy(): void {
this.hidePreview();
}
}

export { RnaPresetTool };
Loading