Closed antoine-zurcher closed 3 years ago
Looks like you didn't add blueprint styles into the page:
<link
href="https://unpkg.com/@blueprintjs/icons@^3.4.0/lib/css/blueprint-icons.css"
rel="stylesheet"
/>
<link
href="https://unpkg.com/@blueprintjs/core@^3.10.0/lib/css/blueprint.css"
rel="stylesheet"
/>
however the Dash library in Python works with React 16
Are you sure it doesn't work with React 17? I strongly recommend updating React version. If you can't do that. Wait for the next polotno
release. Probably it will work with the older React version.
https://unpkg.com/@blueprintjs/core@^3.10.0/lib/css/blueprint.css
Thanks a lot! The blueprint styles were indeed missing.
I had another question: right now I can click on an element from the sidepanel and it appears on the workspace, however I cannot drag and drop the element from the sidepanel to the workspace. Was this feature not implemented in polotno@0.3.0 or am I missing something else in the code ?
I tried the last polotno@0.18.0
with react@16
. And looks like it works ok: https://yi1v5.csb.app/
Was this feature not implemented in polotno@0.3.0 or am I missing something else in the code ?
Probably it is not. It is an old version. It is better to update asap.
Alright, thanks for the infos!
I tried the last
polotno@0.18.0
withreact@16
. And looks like it works ok: https://yi1v5.csb.app/
May I see the versions from the package JSON that you used for this demo ?
Hi,
I am currently implementing the polotno package to build a canvas editor. I am initially using the Dash library in Python to create my web app, which has the possibility to create custom React components in JavaScript such as the polotno canvas. My problem comes from the fact that the toolbar does not render correctly on the web app. Here is a screenshot of it:
There is also another render problem which happens when I try to click on a button (for example Export) from the toolbar which tries to open a pop-up.
This problem might be due to the fact that I am not using the last version of polotno, since polotno@0.17.0 works with React 17 or higher however the Dash library in Python works with React 16 which resulted in a version mismatch and produced this error https://github.com/konvajs/react-konva/issues/171. So I decided to use polotno@0.3.0 which is the lastest version of polotno working with React 16. Does this problem come from the version of polotno or is something wrong with my layout ?
Here is the render function I am using to generate the canvas:
Here is my package JSON: