@graphty/graph-io / positions / writtenPositions
Function: writtenPositions() ​
writtenPositions(
format,coords):Float64Array
Defined in: positions/convert.ts:131
Neutral coordinates (center, y up) as a built-in format's writer expects its position column, so a graph whose positions are in the neutral form is written the way up its program draws it.
Parameters ​
format ​
string
the format being written
coords ​
Float64Array
x, y, z per node; NaN for a node with no position
Returns ​
Float64Array
the coordinates to write (the same array when the format needs no conversion)
Example ​
ts
const column = writtenPositions("gml", coords); // y flipped for GML