stanch / reftree

Automatically generated diagrams and animations for Scala data structures
http://stanch.github.io/reftree/
GNU General Public License v3.0
586 stars 36 forks source link

Vertical sequential list #8

Closed sakshamsharma closed 5 days ago

sakshamsharma commented 7 years ago

Can we have an implicit for drawing a vertical sequential list? Something like:

abcd
    |
efgh
    |
ijkl
    |
end

I was using something like this, but it crashes on some very simple inputs (flowName is a string)

  implicit def cfListDrawer: ToRefTree[List[CFEnum]] = ToRefTree[List[CFEnum]] {
    case x::xs => RefTree.Ref(x, Seq(xs.refTree)).rename(x.flowName)
    case Nil => RefTree.Ref("", Seq()).rename("End")
  }

Would be useful for vertical flow diagrams.

stanch commented 7 years ago

Could you elaborate what is the difference between this and a normal List diagram? Also how does it crash?