DomParfitt / graphviz-react

React component for displaying Graphviz graphs
MIT License
102 stars 21 forks source link

Transitions and Webworker #37

Open un0btanium opened 3 years ago

un0btanium commented 3 years ago

Are smooth transitions possible with this? Or are these d3-graphviz v3 features?

Furthermore, I am receiving warnings in my react app and not quite sure what they mean or how to fix them. I assume this also causes a noticeable freeze in my application when a graph is being generated.


viz.js:60779 Invalid asm.js: Undefined global variable```
magjac commented 3 years ago

Smooth transitions have been available in d3-graphviz since the first release.

I think you can safely ignore that error message. It comes from viz.js and I've never seen any problem because of them. Freezes will occur if you're not using the web worker version of d3-graphviz. I'm not sure which version graphviz-react uses.

un0btanium commented 3 years ago

Hm, which one would be the web worker version of d3-graphviz. How would I find out?

magjac commented 3 years ago

It's documented here, but I don't know how this is handled in graphviz-react. You have to look in the source code or wait for @DomParfitt to answer.

DomParfitt commented 3 years ago

To be honest I'm actually not sure about this myself. We don't set any extra script tags so my gut feeling is that it may not currently be working. I'll have a look and see how easy it would be to add this in.