nomnoml
nomnoml copied to clipboard
Custom Association Type - Crow ended arrow
This is more like a enhancement request or a guide on how to implement. I would like to add a crow type association for representing 1:many in ERDs. Is there an easy way to add it?
I have been thinking about adding the crow foot type association for a long time. Nice to get an actual request!
There is some slight layouting issues that have to be resolved as the edges in nomnoml are not always perpendicular to the node borders.
Is this a good specification for crows feet?: https://vertabelo.com/blog/crow-s-foot-notation/
Yes, that is a very good (standard) specification for ERD diagramming. Please see attached image for a full specification that could be implemented. I could also help out with some tasks. I must say that nomnoml is really cool and useful and would be even more useful with the support for ERD diagramming.
Daniel, do you mind describing how you intend to implement the the crow foot association or in general how the associations are rendered? Do you have a repo for the current work with layout issues?
@tcbuzor the fact that edges could leave a node at 45° angle from a corner is actually a pretty big obstacle to implementing crow feet connectors…
not sure how to deal with that
Why 45 deg angle? Do you have some time to discuss so I can understand better?
See example from plantuml - } to denote crow feet (many side)
For some diagrams the associations meet the nodes at 90 degrees.
But for other the associations would meet at 45 degrees (or any other angle) and maybe hit a corner like in this example:
To enable crows feet we would have to draw the edges differently, which is not supported out of the box right now.
found this on mermaid: The answer I came up with was actually to join two arcs and a centre line to the centre of each entity box, and then to superimpose the opaque entity box on top, thus 'cutting' off what would otherwise look a bit like a leaf, and turning it into a crows foot intersecting with the edge of the box perfectly. This was a eureka moment for me in making it work nicely, but it is something you will have to alter to achieve your goal, otherwise every incoming relationship line will always orient towards the centre of the entity. https://github.com/mermaid-js/mermaid/issues/2751