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

Bonds between atoms are not centered and not drawn symmetrically #2838

Closed
Zhirnoff opened this issue Jun 30, 2023 · 4 comments · Fixed by #3120
Closed

Bonds between atoms are not centered and not drawn symmetrically #2838

Zhirnoff opened this issue Jun 30, 2023 · 4 comments · Fixed by #3120
Assignees
Labels

Comments

@Zhirnoff
Copy link
Collaborator

Steps to Reproduce

  1. Open Ketcher
  2. Add bonds on canvas
  3. Observe alignment of the bonds between atoms and symmetry in the bond drawings.

Actual behavior
Bonds between atoms are not centered and not drawn symmetrically

Expected behavior
Bonds between atoms are centered and drawn symmetrically

Screenshots
2023-06-30_13h50_16

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Version 112.0.5615.138 (Official Build) (64-bit)

Ketcher version
Version 2.12.0-rc.1

@Zhirnoff Zhirnoff added the bug label Jun 30, 2023
@Zhirnoff Zhirnoff added this to the Ketcher 2.13.0-rc.1 milestone Jun 30, 2023
@Inga-Vishnivetskaia Inga-Vishnivetskaia self-assigned this Jul 10, 2023
@Nitvex Nitvex removed their assignment Jul 10, 2023
@Inga-Vishnivetskaia
Copy link
Collaborator

Investigations on this bug:

  1. drawn symmetrically: plainBondTypes ( PATTERN TYPE: SINGLE, DOUBLE, TRIPLE) (bond.b.type equals to 1, 2, 3)
  2. not drawn symmetrically: type HYDROGEN, DATIVE, DOUBLE_OR_AROMATIC, SINGLE_OR_AROMATIC, SINGLE_OR_DOUBLE, AROMATIC, any (bond.b.type equals to 4, 5, 6, 7, 8, 9, 10 )

Object hb1 (rebond.ts, struct.halfBonds.get) has p prop where p.x stores the x render coordinate of bond. This is related also to the bond selection (see hover_selection_2.png). Possible solution may be to change calculation of p.x

@Nitvex Nitvex assigned Nitvex and unassigned Inga-Vishnivetskaia Jul 24, 2023
@AKZhuk AKZhuk self-assigned this Aug 9, 2023
@Nitvex Nitvex removed their assignment Aug 9, 2023
@Zhirnoff
Copy link
Collaborator Author

Zhirnoff commented Aug 9, 2023

Test cases are written by me.

@AKZhuk AKZhuk linked a pull request Aug 16, 2023 that will close this issue
8 tasks
AKZhuk pushed a commit that referenced this issue Aug 16, 2023
AKZhuk pushed a commit that referenced this issue Aug 17, 2023
AKZhuk pushed a commit that referenced this issue Aug 17, 2023
AKZhuk added a commit that referenced this issue Aug 18, 2023
…entered-and-not-drawn-symmetrically

#2838 - Bonds between atoms are not centered and not drawn symmetrically
@MartaWilliams MartaWilliams self-assigned this Aug 21, 2023
@MartaWilliams
Copy link
Collaborator

Tested
Actual behaviour meets acceptance criteria
image

@ViktoriaTkacheva
Copy link
Collaborator

In two bonds (Aromatic Bond, Single/Aromatic Bond) the pattern is not symmetrical - the right dash is shorter than the left

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants