aysylu / loom

Graph library for Clojure. Mailing list https://groups.google.com/forum/#!forum/loom-clj
http://aysy.lu/loom/
886 stars 108 forks source link

Fix io view #132

Closed simongray closed 3 years ago

simongray commented 3 years ago

This PR fixes two problems with the current implementation of loom.io/dot-str which affect viewing graphs with loom.io/view. These are long-standing issues that I have had to circumvent in my own code.

This PR undoes these two issues:

The current behaviour make Loom quite pointless for visualising graphs since Loom doesn't even respect its own graph protocols, preferring to assume that e.g. graph edges are always Clojure vectors. It also results in wrong graphs being drawn since Loom complects node labels and node identity, when clearly it must be possible for two nodes to have the same label in a graph.