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

#5969 - Load from file having only micro structures on macro canvas causes unnecessary zoom up to 200% and shift molecule to top left angle #6057

Conversation

rrodionov91
Copy link
Collaborator

@rrodionov91 rrodionov91 commented Dec 4, 2024

How the feature works? / How did you fix the issue?

(Screenshots, videos, or GIFs, if applicable)

Check list

  • unit-tests written
  • e2e-tests written
  • documentation updated
  • PR name follows the pattern #1234 – issue name
  • branch name doesn't contain '#'
  • PR is linked with the issue
  • base branch (master or release/xx) is correct
  • task status changed to "Code review"
  • reviewers are notified about the pull request

…auses unnecessary zoom up to 200% and shift molecule to top left angle
@@ -166,6 +166,16 @@ export class DrawingEntitiesManager {
return this.allEntities.length !== 0;
}

public get hasMonomers() {
const monomers = [...this.monomers.values()].filter(
Copy link
Collaborator

Choose a reason for hiding this comment

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

filter method doesn't mutate the original array and creates a new copy, perhaps you can just use this.monomers.values().filter() here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this.monomers.values() returns Iterator, so destructuring operator needs to create array from Iterator.

@rrodionov91 rrodionov91 merged commit dd41632 into release/2.27 Dec 4, 2024
3 checks passed
@rrodionov91 rrodionov91 deleted the 5969-Load_from_file_having_only_micro_structures_on_macro_canvas_causes_unnecessary_zoom_up_to_200%_and_shift_molecule_to_top_left_angle branch December 4, 2024 18:27
rrodionov91 added a commit that referenced this pull request Dec 4, 2024
…auses unnecessary zoom up to 200% and shift molecule to top left angle (#6057)
rrodionov91 added a commit that referenced this pull request Dec 5, 2024
…auses unnecessary zoom up to 200% and shift molecule to top left angle (#6057) (#6064)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants