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
-
Steps to Reproduce
create-react-app
>npm install --save ketcher-react
>npm install --save ketcher-standalone
. The resultingpackage.json
is the following:Editor
component 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
![image](https://user-images.githubusercontent.com/19714287/121106599-564fda00-c7d4-11eb-98c6-b539131d5494.png)
Initial render:
After a few clicks on the canvas:
![image](https://user-images.githubusercontent.com/19714287/121106647-6e275e00-c7d4-11eb-81c1-b73e6f20cf61.png)
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-react
to 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