visualisation-tool icon indicating copy to clipboard operation
visualisation-tool copied to clipboard

Support for vertical diagrams

Open timgdavies opened this issue 5 years ago • 1 comments

The visual language rules allow for horizontal and vertical diagrams.

Is it possible to implement a simple switch to choose between these layout options?

timgdavies avatar Jun 08 '20 09:06 timgdavies

I took a quick look at this today, there's a simple switch in terms of the underlying options we give to dagre-d3, but doing so breaks the offset paths we use to draw ownership & control separately. Specifically the offset doesn't work any more, so we just get a single line instead of two visible.

Technically, it seems like there's some divide-by-zero issue, either in code which turns our SVG path into a bezier curve, or in the code that then offsets the curve.

The solution to this seems non-trivial, I think it's basically because dagre-d3 doesn't draw continuous curves, they have little straight bits coming out of the nodes. I'm not sure why this isn't a problem on horizontal layouts though.

stevenday avatar Sep 16 '20 13:09 stevenday