Editor height shrinks upon click events in standalone mode #583
Unanswered
Theophylline
asked this question in
Q&A
Replies: 2 comments
-
|
Dear @Theophylline , I have analyze your case and want to inform you non-full-size works without any issues if you set fixed size of parent element. In your case antd lib adds some additional elements (please see screen below): To fix this issue please wrap with <div style={{ width: 700, height: 500 }}>. Please inform me if this solution works for you. Best regards, |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Nice this works, thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Steps to Reproduce
create-react-app>npm install --save ketcher-react>npm install --save ketcher-standalone. The resultingpackage.jsonis the following:Editorcomponent inApp.js. This step is essentially a copy pasta from the documentation. Note that I tried to render a non-full-size editor by placing it inside a fixed<Card />container, as instructed in Add code example: Embed Ketcher into React SPA #415. But the result is the same if I try to render a full size editor.Expected behavior
Height should be fixed upon user interaction
Actual behavior
Height decreases upon user interaction
Screenshots

Initial render:
After a few clicks on the canvas:

Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Trying to include this component as part of a dashboard, so I hope to be able to resize this component and keep its size fixed. If I downgrade
ketcher-reactto 2.1.0, the problem goes away (i.e height is fixed), but placing<Editor />in a fixed parent container doesn't resize the component.Beta Was this translation helpful? Give feedback.
All reactions