@graphty/graph-io / positions / FilePositions
Interface: FilePositions ​
Defined in: positions/types.ts:222
A file's stored node coordinates in the neutral convention: the node's center, y up, in the file's own unit, 3 components per node.
Properties ​
bounds ​
readonlybounds: {max: readonly [number,number,number];min: readonly [number,number,number]; } |null
Defined in: positions/types.ts:262
The box around every placed node, or null when none is placed.
Union Members ​
Type Literal ​
{ max: readonly [number, number, number]; min: readonly [number, number, number]; }
max ​
readonlymax: readonly [number,number,number]
The largest x, y and z.
min ​
readonlymin: readonly [number,number,number]
The smallest x, y and z.
null
coords ​
readonlycoords:Float64Array
Defined in: positions/types.ts:254
x, y, z per node, by node index (3 * nodeCount); NaN for a node with no position.
dims ​
readonlydims:2|3
Defined in: positions/types.ts:252
3 when the nodes differ in z, else 2 (z is then 0).
groups ​
readonlygroups: readonlyFilePositionGroup[]
Defined in: positions/types.ts:269
Group containers with a box.
medianNodeSize ​
readonlymedianNodeSize:number|null
Defined in: positions/types.ts:250
The median node diameter, in units, when the file stores node sizes; else null.
notes ​
readonlynotes: readonlyPositionNote[]
Defined in: positions/types.ts:271
What could not be read as written.
placed ​
readonlyplaced:number
Defined in: positions/types.ts:256
The nodes with a position.
pxPerUnit? ​
readonlyoptionalpxPerUnit?:number
Defined in: positions/types.ts:241
How many px (points) one unit is, when units is "file" but the file's unit is a known length (Graphviz input inches: 72); absent otherwise. Multiply a coordinate by it to compare it with the file's px style lengths.
source ​
readonlysource:object
Defined in: positions/types.ts:226
Where the coordinates came from: the format, the tool that wrote the file, and the y direction it used.
format ​
readonlyformat:string
The format that read the file.
tool ​
readonlytool:GraphTool|null
The tool that wrote the file, or null when the file does not say.
yAxis ​
readonlyyAxis:YAxis
Which way y grew in the file; every coordinate here has y up.
total ​
readonlytotal:number
Defined in: positions/types.ts:258
The nodes that need one: every node except group containers the file gives no box.
units ​
readonlyunits:LengthUnit
Defined in: positions/types.ts:235
The unit of every coordinate and size.
usable ​
readonlyusable:boolean
Defined in: positions/types.ts:260
False when nothing is stored, or every node sits on one point (coords are then all NaN).
version ​
readonlyversion:1
Defined in: positions/types.ts:224
The shape version of this object.
viewerFit? ​
readonlyoptionalviewerFit?:ViewerFit
Defined in: positions/types.ts:248
Set when the coordinates have no fixed length: the program that draws the file fits their bounding box into its canvas, padding px in from each side, and draws label sizes in the canvas's px (sigma.js). A label of s px is then s / k units, where k is the px per unit of that fit on the canvas it is drawn on. Absent otherwise.