Description: When using the API call window.ketcher.editor.setOptions(JSON.stringify({ viewOnlyMode: true })), structures already present on canvas are unexpectedly moved to the center, as if a layout function is being applied. This behavior is unintended and disrupts the original positioning of structures.
Steps to Reproduce:
1) Add any structures onto the canvas.
2) Use the following API call: window.ketcher.editor.setOptions(JSON.stringify({ viewOnlyMode: true })).
3) Observe the position of the structures on the canvas.
Actual Result: The structures shift to center of the canvas, behaving as though a layout is being applied.
Expected Result: The structures should remain in their original position without any movement or layout changes.
Description: When using the API call window.ketcher.editor.setOptions(JSON.stringify({ viewOnlyMode: true })), structures already present on canvas are unexpectedly moved to the center, as if a layout function is being applied. This behavior is unintended and disrupts the original positioning of structures.
Steps to Reproduce:
1) Add any structures onto the canvas. 2) Use the following API call: window.ketcher.editor.setOptions(JSON.stringify({ viewOnlyMode: true })). 3) Observe the position of the structures on the canvas.
Actual Result: The structures shift to center of the canvas, behaving as though a layout is being applied.
Expected Result: The structures should remain in their original position without any movement or layout changes.
Screenshots
https://github.com/user-attachments/assets/73bc2eb1-0619-4e34-bbf0-7542645001fd
Desktop:
Ketcher version [Version 2.25.0-rc.1] Indigo version [Version 1.24.0-rc.1]
Bug found during testing: https://github.com/epam/ketcher/issues/4965