sverweij / state-machine-cat

write beautiful state charts :scream_cat:
https://state-machine-cat.js.org
MIT License
811 stars 45 forks source link

show multiple graphs in a single page #75

Closed Jiajun-Deng closed 5 years ago

Jiajun-Deng commented 5 years ago

I don't if this feature is already available or not. I'd like to use state-machine-cat to show several graphs in a single page. .

Context

I can image I need to set up different containers with different id. How about the svg generated in smcat.render()? Shall I assign an id for each generated svg? I think in this package there should be a portal for us to do so.

Proposed Behavior

I tried to do so and thought the render graph action should run correctly. Like each syntax generated corresponding svg and each svg displys in corresponding div.innerHtml.

Current Behavior

The smcat.render() threw an error.

Hope you can think about this. Thanks.

sverweij commented 5 years ago

Hi - it's possible to have more than one rendition on a single page. Last night I wrote a sample to be sure it still works. It's a scripts that runs after page load. For each Githubissues.

  • Githubissues is a development platform for aggregating issues.