epam / ketcher

Web-based molecule sketcher
https://lifescience.opensource.epam.com/ketcher/demo.html
Apache License 2.0
504 stars 174 forks source link

Positioning of loaded content should be consistent for both cases - with autozooming triggering and without #5926

Open AlexeyGirin opened 3 weeks ago

AlexeyGirin commented 3 weeks ago

Steps to Reproduce

  1. Go to Macro - Flex mode
  2. Load from file: 7 monomers.zip That would be picture 1
  3. Load from file: 15 monomers.zip That would be picture 2

Actual behavior In case of picture 1 - system adjust top left of bounding box of loaded content to top left corner of canvas + autozoom triggered image In case of picture 2 - system adjust center of bounding box of loaded content to the center of canvas (no autozoom) image

As per @ljubica-milovic - logic should be consistent - we have to adjust top left of bounding box of loaded content to top left corner of canvas in any case

Expected behavior In case of picture 1 - system adjust top left of bounding box of loaded content to top left corner of canvas + autozoom triggered image In case of picture 2 - system adjust top left of bounding box of loaded content to top left corner of canvas (no autozoom) image

As per @ljubica-milovic - logic should be consistent - we have to adjust top left of bounding box of loaded content to top left corner of canvas in any case

Versions

Found while testing - https://github.com/epam/ketcher/issues/5600