#10856 – Fix unable to connect two or more monomers to atom in a row - #11075
Merged
AlexeyGirin merged 2 commits intoAug 18, 2026
Merged
Conversation
la-nuta
force-pushed
the
10856-unable-to-connect-two-or-more-monomers-to-atom-in-a-row
branch
from
August 10, 2026 12:11
cccc6f5 to
d1313e9
Compare
Recreate hover contour after atom update and clear stale ref on remove so the hit-testable element is always present in the current SVG root. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
la-nuta
force-pushed
the
10856-unable-to-connect-two-or-more-monomers-to-atom-in-a-row
branch
from
August 12, 2026 14:34
d1313e9 to
7aa3f3f
Compare
rrodionov91
approved these changes
Aug 18, 2026
AlexeyGirin
deleted the
10856-unable-to-connect-two-or-more-monomers-to-atom-in-a-row
branch
August 18, 2026 13:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10856
How the feature works? / How did you fix the issue?
Root cause: After
AtomRenderer.update()removed and rebuilt its SVG children, the hover contour (hoverElement) was not recreated. The hover contour is the only hit-testable element for connection detection, so once it was gone any subsequent attempt to connect a monomer to the same atom silently found nothing and failed. Additionally,remove()did not clear the stalehoverElementreference, soshow()could not recreate it in the new SVG root.Fix: In
update(), callthis.hoverElement = this.appendHover()after clearing the existing elements so the hit target is always present. Inremove(), setthis.hoverElement = undefinedso the stale reference is cleared andshow()rebuilds it from scratch in the correct root.Verification: Opened the macromolecules editor, placed a small molecule atom, connected one monomer to it via R1, then connected a second monomer to the same atom — both connections succeeded and the structure rendered correctly. Confirmed that hover highlighting and single-monomer connections still work normally.
Check list
#1234 – issue name