js-sequence-diagrams icon indicating copy to clipboard operation
js-sequence-diagrams copied to clipboard

Make diagrams collapsible

Open mcintyre321 opened this issue 6 years ago • 1 comments

Thanks for such a cool project!

I was just thinking that it would be really neat to be able to expand/collapse parts of the chart, and raise an event, allowing an integrator to save the state to localstorage, and to load it again

e.g. given

Andrew->China.Ear: Says "How are you"
China.Ear ->China.Brain: Heard "How are you"
China.Brain->China.Brain.HealthStatus: Check healthiness
China.Brain.HealthStatus-> China.Brain: Everything OK
China.Brain->China.Mouth: Say "Fine thanks"
China.Mouth-->Andrew: Says "Fine Thanks"

You could have a +/- in the UI, which would collapse all the nodes under China into one (effectively giving)

Andrew ->China: Says "How are you"
China ->Andrew: Says "Fine Thanks"

This way you can produce really complex, large diagrams, then filter them down to demonstrate just the information relevant.

mcintyre321 avatar Jan 16 '19 10:01 mcintyre321

yeah, that would be super dope :-)

serapath avatar Nov 10 '22 00:11 serapath