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

Center molecules after layout #2078

Closed
Nitvex opened this issue Jan 10, 2023 · 4 comments · Fixed by #2931
Closed

Center molecules after layout #2078

Nitvex opened this issue Jan 10, 2023 · 4 comments · Fixed by #2931

Comments

@Nitvex
Copy link
Collaborator

Nitvex commented Jan 10, 2023

Is your feature request related to a problem? Please describe.
It is required to display structures and reactions in the middle of the screen, when user clicks layout button.

#184100496

@luna215
Copy link

luna215 commented Jan 28, 2023

I'm currently trying to implement this for a side project. Would it be enough to be able to do this programmatically with

ketcher.addFragment("...")

and we would just change the definition of the function to take in parameters?

ketcher.addFragment("...", x=10, y=10)

and the users would be able to center the structure by using the dimensions of the editor?

Would love to help with this anyway I can!

@luna215
Copy link

luna215 commented Jan 28, 2023

I'm currently trying to implement this. Would it be enough to be able to do this programmatically with

ketcher.addFragment("...")

and we would just change the definition of the function to take in parameters?

ketcher.addFragment("...", x=10, y=10)

and the users would be able to get the half of this structure based on the size of the editor?

Would love to help with this anyway I can!

@Nitvex
Copy link
Collaborator Author

Nitvex commented Jul 12, 2023

I'm currently trying to implement this. Would it be enough to be able to do this programmatically with

ketcher.addFragment("...")

and we would just change the definition of the function to take in parameters?

ketcher.addFragment("...", x=10, y=10)

and the users would be able to get the half of this structure based on the size of the editor?

Would love to help with this anyway I can!

I think not. In my opinion, it is better to calculate the required coordinates in Ketcher itself, rather than on user's side.

@Nitvex Nitvex assigned Nitvex and unassigned AnastasiiaPlyako Jul 13, 2023
@Nitvex Nitvex changed the title Center molecules after layout and pasting Center molecules after layout Jul 13, 2023
Nitvex added a commit that referenced this issue Jul 18, 2023
Nitvex added a commit that referenced this issue Jul 18, 2023
Nitvex added a commit that referenced this issue Jul 18, 2023
Nitvex added a commit that referenced this issue Jul 19, 2023
* #2078 – Center molecules after layout

* #2078 – Center molecules after layout
@Zhirnoff
Copy link
Collaborator

Zhirnoff commented Aug 1, 2023

Feature working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants