I am building a custom ORM schema builder using diagram-js. I looking to understand what approaches exist or should be followed in writing a custom layouter module.
From what I have been able to infer from the codebase, the layouter module has one job, return a ordered sequence of waypoints from source to target. In order to understand what context is available when layouter is called, I did a search on the codebase and captured what I found below.
It seems like a lot of things interact directly and indirectly with the attribute ‘waypoint’ on connections. For example, the ‘Bendpoints’ modules interacts with the waypoints on a connection but does not call layouter. Also it is a bit odd that default layouter is not compatible with the ‘Bendpoints’ module (I would be happy to offer a PR to make them if interested).
For those that are more experienced with using diagram-js, are there pitfalls I should be aware of? Or is there patterns to use in terms of attributes on the connections opposed to including them in the hints/context for layout purposes?
Thanks in advance for your thoughts and advice.