ifandelse / machina.js

js ex machina - finite state machines in JavaScript
http://machina-js.org/
Other
1.93k stars 147 forks source link

Be able to export state machine diagram #76

Closed oliverzy closed 9 years ago

oliverzy commented 9 years ago

Hi Author,

The library is in pretty good shape, I would like to use it in our project. My question is that is there any plan to support exporting state machine diagram?

The state machine diagram is very useful in documentation and also be able to communicate with non-technical people.

ifandelse commented 9 years ago

@oliverzy Actually this is something I've thought about, though I haven't spiked out any ideas yet. If you've come across any decent chart-producing JS libs that you like, let me know. :smile:

oliverzy commented 9 years ago

I recommend JointJS. FSM support is builtin. See this example: http://www.jointjs.com/demos/fsa JointJS is based on svg, I think it's better than static image.

oliverzy commented 9 years ago

After playing with the library, I found it seems hard to export a diagram for machina because machina doesn't explicitly define transition end state when the value of inputType is a function not a string.

ifandelse commented 9 years ago

Closing this for now - it would be a nice-to-have option at some point, so I may try to revisit it later.