package proximity
Import Path
github.com/pancsta/d2/d2layouts/d2talalayout/internal/proximity (on go.dev)
Dependency Relation
imports 8 packages, and imported by 2 packages
Involved Source Files
common_uncle.go
herding.go
Package proximity discovers layout relationships between nearby nodes.
nears.go
Package-Level Functions (total 8)
AddHubs discovers nodes that have both a leaf spoke and another connection
within the same containing layout group.
ApplyVirally propagates each known herd orientation through its ordered groups.
AssignHerds chooses a shared container side for siblings whose external
cousins should remain mutually accessible during placement.
AssignNears marks otherwise unconnected siblings that share an external
neighbor so placement keeps them close together.
CanUseBothSides reports whether node is long enough perpendicular to
orientation to host herd members on both parallel sides.
CommonUncleSiblings finds siblings that connect to the same node at their
parent's level. Placement uses the largest such set as a proximity hint.
GroupSheep groups root's children by their external uncle and records the
cousin connections that define each group.
SyncHerdFences updates the coordinate constraint for every assigned herd to
the current graph boundary.
![]() |
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. |