clientIO / joint

A proven SVG-based JavaScript diagramming library powering exceptional UIs
https://jointjs.com
Mozilla Public License 2.0
4.45k stars 841 forks source link

(WIP) refactor(@joint/layout-directed-graph): avoid indirect function calls in API #2599

Open zbynekstara opened 1 month ago

zbynekstara commented 1 month ago

Description

The old API of DirectedGraph had to count with the possibility that the API is being called from the dia.Graph object. To be able to do that, it made use of call and bind methods. With the separation of DirectedGraph as a separate plugin, there is no longer any need for these complications.

Also fixes the docs of the fromGraphLib() function for the case where a new JointJS Graph is created from a Graphlib graph, and adds a test.