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

#2128 Automatically adjust zoom when opening a structure #2802

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

rrodionov91
Copy link
Collaborator

@rrodionov91 rrodionov91 commented Jun 27, 2023

Closes #2128

Changes

  • added method in editor to zoom according content
  • added this method execution after drawing opened structure

Basic acceptance criteria

Open big structure, delete, open small structure, delete, open big structure

2128.mov

- added method in editor to zoom according content
- added this method execution after drawing opened structure
@rrodionov91 rrodionov91 force-pushed the #2128-zoom-according-open-content branch from 087a2aa to 1ac8b23 Compare June 27, 2023 16:00
rrodionov91 pushed a commit that referenced this pull request Jun 28, 2023
- fixed last cursor position calculation
@@ -330,6 +330,27 @@ class Editor implements KetcherEditor {
return this.render.options.zoom
}

zoomAccordingContent() {
Copy link
Collaborator

@kaluginserg kaluginserg Jun 30, 2023

Choose a reason for hiding this comment

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

Just curious, there is "autoScale" property in the render options, that do something similar, can't use use it?
@rrodionov91

Copy link
Collaborator Author

@rrodionov91 rrodionov91 Jun 30, 2023

Choose a reason for hiding this comment

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

Looks like autoscale is about scaling the size of structures after its addition on canvas:
https://github.com/epam/ketcher/assets/14859362/cd6c1f72-ab56-4caf-b032-921fcc89e7fd

@Nitvex Nitvex merged commit f30bccb into master Jul 6, 2023
@Nitvex Nitvex deleted the #2128-zoom-according-open-content branch July 6, 2023 09:26
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.

Automatically adjust zoom when opening a structure
3 participants