Skip to content

@graphty/layout / positions / toPositionMap

Function: toPositionMap() ​

toPositionMap(r, ids): PositionMap

Defined in: positions.ts:25

The id-keyed map of a layout result. A node the layout left unplaced (every component NaN, as shell and multipartite leave a node in no shell or layer) has no entry.

Parameters ​

r ​

LayoutResult

the layout result

ids ​

NodeIdMap

the id map of the snapshot the layout ran over

Returns ​

PositionMap

one dim-component row per placed node, keyed by the node's id