Source File
axis.go
Belonging Package
github.com/pancsta/d2/d2layouts/d2talalayout/internal/placement
package placementimporttype layoutAxis uint8const (invalidAxis layoutAxis = iotahorizontalAxisverticalAxis)func ( layoutAxis) () bool {return == horizontalAxis || == verticalAxis}func ( layoutAxis) () bool {return == horizontalAxis}func ( layoutAxis) () layoutAxis {switch {case horizontalAxis:return verticalAxiscase verticalAxis:return horizontalAxisdefault:return invalidAxis}}func axisForArrangement( layoutgraph.ClusterArrangement) layoutAxis {if == layoutgraph.Column {return horizontalAxis}return verticalAxis}type traversalDirection uint8const (invalidDirection traversalDirection = iotaforwardDirectionbackwardDirection)func ( traversalDirection) () bool {return == forwardDirection || == backwardDirection}func ( traversalDirection) () bool {return == forwardDirection}func ( traversalDirection) () traversalDirection {switch {case forwardDirection:return backwardDirectioncase backwardDirection:return forwardDirectiondefault:return invalidDirection}}
![]() |
The pages are generated with Golds v0.8.7. (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. |