-
Notifications
You must be signed in to change notification settings - Fork 169
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
If the coordinates have a centroid that is far from zero, the molecule placed far offscreen. #1864
Comments
Zhirnoff
changed the title
If the coordinates have a centroid that is far from zero, the molecule can be placed far offscreen.
If the coordinates have a centroid that is far from zero, the molecule placed far offscreen.
Nov 22, 2022
porcelain11
added a commit
that referenced
this issue
Dec 7, 2022
porcelain11
added a commit
that referenced
this issue
Dec 7, 2022
porcelain11
added a commit
that referenced
this issue
Dec 9, 2022
porcelain11
added a commit
that referenced
this issue
Dec 12, 2022
porcelain11
added a commit
that referenced
this issue
Dec 12, 2022
porcelain11
added a commit
that referenced
this issue
Dec 14, 2022
Nitvex
pushed a commit
that referenced
this issue
Dec 14, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to Reproduce
await ketcher.setMolecule(`
Mrv2118 11202219232D
0 0 0 0 0 999 V3000
M V30 BEGIN CTAB
M V30 COUNTS 8 8 0 0 0
M V30 BEGIN ATOM
M V30 1 C 51.8392 -54.8062 0 0
M V30 2 C 51.8392 -53.2662 0 0
M V30 3 N 53.1738 -55.5762 0 0
M V30 4 C 54.5074 -54.8062 0 0
M V30 5 C 54.5074 -53.2662 0 0 CFG=1
M V30 6 O 53.1738 -52.4962 0 0
M V30 7 N 55.841 -55.5762 0 0
M V30 8 C 55.8411 -52.4962 0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 1 2
M V30 2 1 1 3
M V30 3 1 6 2
M V30 4 2 3 4
M V30 5 1 4 5
M V30 6 1 4 7
M V30 7 1 5 6
M V30 8 1 5 8 CFG=1
M V30 END BOND
M V30 BEGIN COLLECTION
M V30 MDLV30/STEREL1 ATOMS=(1 5)
M V30 END COLLECTION
M V30 END CTAB
M END
`)
4. Look at canvas
Actual behavior
The molecule placed far offscreen. It is necessary to scroll a long way in order to see it or make 'Zoom out'
Expected behavior
After 'setMolecule' is called, the coordinates are normalised and the molecule is displayed iin the visible area of the canvas.
Screenshots
Desktop (please complete the following information):
Ketcher version
[Version 2.6.2]
Build at 2022-11-17; 13:01:16
The text was updated successfully, but these errors were encountered: