package label

Import Path
	oss.terrastruct.com/d2/lib/label (on go.dev)

Dependency Relation
	imports 2 packages, and imported by 12 packages

Involved Source Files label.go
Package-Level Type Names (only one)
/* sort by: | */
( Position) GetPointOnBox(box *geo.Box, padding, width, height float64) *geo.Point return the top left point of a width x height label at the given label position on the route also return the index of the route segment that point is on ( Position) IsBorder() bool ( Position) IsEdgePosition() bool ( Position) IsOnEdge() bool ( Position) IsOutside() bool ( Position) IsShapePosition() bool ( Position) IsUnlocked() bool ( Position) Mirrored() Position ( Position) String() string Position : expvar.Var Position : fmt.Stringer func FromString(s string) Position func Position.Mirrored() Position const BorderBottomCenter const BorderBottomLeft const BorderBottomRight const BorderLeftBottom const BorderLeftMiddle const BorderLeftTop const BorderRightBottom const BorderRightMiddle const BorderRightTop const BorderTopCenter const BorderTopLeft const BorderTopRight const InsideBottomCenter const InsideBottomLeft const InsideBottomRight const InsideMiddleCenter const InsideMiddleLeft const InsideMiddleRight const InsideTopCenter const InsideTopLeft const InsideTopRight const OutsideBottomCenter const OutsideBottomLeft const OutsideBottomRight const OutsideLeftBottom const OutsideLeftMiddle const OutsideLeftTop const OutsideRightBottom const OutsideRightMiddle const OutsideRightTop const OutsideTopCenter const OutsideTopLeft const OutsideTopRight const UnlockedBottom const UnlockedMiddle const UnlockedTop const Unset
Package-Level Functions (only one)
Package-Level Constants (total 41)
These are % locations where labels will be placed along the connection
This is the space between a node border and its outside label
const RIGHT_LABEL_POSITION = 0.75
const UnlockedTop Position = 34
const Unset Position = 0