Source File
seqdiagram.go
Belonging Package
oss.terrastruct.com/d2/d2graph
package d2graphimport ()func ( *Object) () bool {return != nil && .Shape.Value == d2target.ShapeSequenceDiagram}func ( *Object) () *Object {for != nil {= .Parentif .IsSequenceDiagram() {return}}return nil}// groups are objects in sequence diagrams that have no messages connected// and does not have a note as a child (a note can appear within a group, but it's a child of an actor)func ( *Object) () bool {if .OuterSequenceDiagram() == nil {return false}for , := range .Graph.Edges {if .Src == || .Dst == {return false}}for , := range .ChildrenArray {// if the child contains a message, it's a span, not a noteif !.ContainsAnyEdge(.Graph.Edges) {return false}}return .ContainsAnyObject(.Graph.Objects) || .ContainsAnyEdge(.Graph.Edges)}// notes are descendant of actors with no edges and no childrenfunc ( *Object) () bool {if .OuterSequenceDiagram() == nil {return false}return !.hasEdgeRef() && !.ContainsAnyEdge(.Graph.Edges) && len(.ChildrenArray) == 0 && !.ContainsAnyObject(.Graph.Objects)}func ( *Object) () bool {for , := range .References {if .MapKey != nil && len(.MapKey.Edges) > 0 {return true}}return false}func ( *Object) ( []*Object) bool {for , := range {if .ContainedBy() {return true}}return false}func ( *Object) ( *Object) bool {for , := range .References {:= .ScopeObjfor != nil {if == {return true}= .Parent}}return false}func ( *Object) ( []*Edge) bool {for , := range {if .ContainedBy() {return true}}return false}func ( *Edge) ( *Object) bool {for , := range .References {:= .ScopeObjfor != nil {if == {return true}= .Parent}}return false}func ( *Edge) () *Object {for , := range .References {if .ScopeObj.IsSequenceDiagramGroup() {return .ScopeObj}}return nil}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |