I updated to scala-graph 2.0 and noticed a change when two nodes have multiple directed edges with only different labels. In scala-graph 1.x both edges were shown (when converting to Dot), but in 2.0 only one of the edges is shown. Is this expected behavior?
// Type of an edge label
private case class EdgeLabel(labels: List[String], edgeType: EdgeType, missing: Option[MissingType] = None) {
lazy val label: String = labels.sorted.mkString("\\n")
}
// Holds both components of an edge
private case class ComponentPair(from: String, to: String)
// Describes an Edge from one component to another
private case class EdgeModel(components: ComponentPair, label: EdgeLabel)
// Labeled directed edges
private case class MyLDiEdge(model: EdgeModel)
extends AbstractDiEdge(source = model.components.from, target =
model.components.to)
private object MyGraph extends TypedGraphFactory[String, MyLDiEdge]
// ...
val allEdgeModels: List[EdgeModel] = ...
val g = MyGraph.from(
allEdgeModels.map(MyLDiEdge)
)
// Convert to dot
val dot = g.toDot(
dotRoot = root,
edgeTransformer = edgeTransformer,
cNodeTransformer = Some(nodeTransformer)
)