const CENTER_LABEL_POSITION = 2.0 / 4.0
These are % locations where labels will be placed along the connection
const LEFT_LABEL_POSITION = 1.0 / 4.0
This is the space between a node border and its outside label
const PADDING = 5
const RIGHT_LABEL_POSITION = 3.0 / 4.0
type Position int8
const ( Unset Position = iota OutsideTopLeft OutsideTopCenter OutsideTopRight OutsideLeftTop OutsideLeftMiddle OutsideLeftBottom OutsideRightTop OutsideRightMiddle OutsideRightBottom OutsideBottomLeft OutsideBottomCenter OutsideBottomRight InsideTopLeft InsideTopCenter InsideTopRight InsideMiddleLeft InsideMiddleCenter InsideMiddleRight InsideBottomLeft InsideBottomCenter InsideBottomRight UnlockedTop UnlockedMiddle UnlockedBottom )
func FromString(s string) Position
func (labelPosition Position) GetPointOnBox(box *geo.Box, padding, width, height float64) *geo.Point
func (labelPosition Position) GetPointOnRoute(route geo.Route, strokeWidth, labelPercentage, width, height float64) (point *geo.Point, index int)
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
func (position Position) IsEdgePosition() bool
func (position Position) IsOnEdge() bool
func (position Position) IsOutside() bool
func (position Position) IsShapePosition() bool
func (position Position) IsUnlocked() bool
func (position Position) Mirrored() Position
func (position Position) String() string