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

#3553 - macro while pulling bond onto monomer a preview is shown when hover monomer #3600

Conversation

ivan-arkhipov-epam
Copy link
Collaborator

@ivan-arkhipov-epam ivan-arkhipov-epam commented Nov 21, 2023

How the feature works? / How did you fix the issue?

This PR prevents monomer preview from being displayed when user is drawing a polymer bond

Check list

  • unit-tests written
  • e2e-tests written
  • documentation updated
  • PR name follows the pattern #1234 – issue name
  • branch name doesn't contain '#'
  • PR is linked with the issue
  • base branch (master or release/xx) is correct
  • task status changed to "Code review"
  • reviewers are notified about the pull request

@ivan-arkhipov-epam ivan-arkhipov-epam marked this pull request as ready for review November 22, 2023 09:26
@@ -208,7 +210,9 @@ function Editor({ theme, togglerComponent }: EditorProps) {
});
editor?.events.mouseOnMoveMonomer.add((e) => {
handleClosePreview();
handleOpenPreview(e);
if (e.buttons !== 1 || !noPreviewTools.includes(activeTool)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move e.buttons !== 1 to constant like isLeftClick (am I right about this number?). Everything else looks good time from code perspective

@rrodionov91 rrodionov91 merged commit fd2a633 into master Nov 27, 2023
@rrodionov91 rrodionov91 deleted the 3553-macro-while-pulling-bond-onto-monomer-a-preview-is-shown-when-hover-monomer branch November 27, 2023 12:44
captain2b pushed a commit that referenced this pull request Nov 28, 2023
… hover monomer (#3600)

* Conditional rendering of the monomer preview
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.

Macro: While pulling bond onto monomer, a preview is shown when hover monomer
4 participants