Source File
geometry_policy.go
Belonging Package
github.com/pancsta/d2/d2layouts/d2talalayout/internal/layoutgraph
package layoutgraph// Shared geometry invariants used by multiple layout stages.const (// AxisAlignmentTolerance is the maximum coordinate difference still treated// as axis-aligned.AxisAlignmentTolerance = 1.0// NodeGap is the minimum gap between unconnected nodes.NodeGap = 20// ConnectedNodeGap is the minimum gap between connected nodes.ConnectedNodeGap = 60// TableNodeGap leaves enough room for table-edge routing.TableNodeGap = 2 * ConnectedNodeGap// ContainerPadding is the ordinary padding on each side of a container.ContainerPadding = 60// MaxIconSize caps positioned icon geometry.MaxIconSize = 64// MinArrowheadClearance is the minimum route length needed to fit an arrowhead.MinArrowheadClearance = 20.0// MinPortClearance keeps the first route bend away from its port.MinPortClearance = 20.0// MinRouteNodeClearance keeps visibility-graph points away from node bounds.MinRouteNodeClearance = 20.0// TreeParentSpacing is the fixed gap used to place and route tree levels.TreeParentSpacing = 100.0// CrossingCostWeight is the shared penalty for one edge crossing.CrossingCostWeight = 0.48 * 0.48 * 0.48)
![]() |
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. |