projectstorm / react-diagrams

a super simple, no-nonsense diagramming library written in react that just works
https://projectstorm.cloud/react-diagrams
MIT License
8.58k stars 1.17k forks source link

Canvas does not show up when used with Material-ui #815

Open mmigdiso opened 3 years ago

mmigdiso commented 3 years ago

I'm trying to embed react-canvas into the material-ui(5.0.0-alpha.27 but I observe the same problem with stable versions) The CanvasWidget does not render unless I disable the position: relative; definition in .css-18f0176

I couldn't find a way to disable/overwrite the position style.

Praveer-grover commented 3 years ago

Yup, it is also coming for me as well. Found a hackish way, not sure if you could apply the style in a similar way or not depending on your DOM hierarchy: image

ghost commented 3 years ago

I am facing the same issue as well. By overriding the CSS class, the diagram shows up but the lines joining the nodes are not properly aligned with the nodes. Any suggestions?

drnguyenn commented 3 years ago

I am facing the same issue as well. By overriding the CSS class, the diagram shows up but the lines joining the nodes are not properly aligned with the nodes. Any suggestions?

I tried to set the position to absolute and the diagram seems to work