emumba-com / react-js-diagrams

A flow based diagramming library written in React
MIT License
13 stars 2 forks source link

DiagramEngine should not cache instanceFactories by model constructor names #2

Open umarashfaq opened 7 years ago

umarashfaq commented 7 years ago

instanceFactories are cached/referenced in DiagramEngine by class/constructor names provided by BaseModel. Model class/constructor names are changed by build/compression tools like Webpack/uglify. Because of that, instance factory keys are prone to mismatching. Hence the framework breaks when run from a compressed script file.

Koli96 commented 6 years ago

Have you fixed it?

umarashfaq commented 6 years ago

No.

This is a fundamental change that impacts everything in the library. This problem, combined with some other core problems (un-intuitive API for average React developers being the top reason), motivated me to re-think the library and create it from ground up:

https://github.com/emumba-com/drawit

If you like, checkout the code and see the demo. There are some additional goodies there like connector points snapping to ports, but it's still a prototype, and requires some finishing before being production ready. This is the project towards which I'll be focusing my future efforts.