Skip to content

@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 ​

readonly bounds: { 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 ​

readonly max: readonly [number, number, number]

The largest x, y and z.

min ​

readonly min: readonly [number, number, number]

The smallest x, y and z.


null


coords ​

readonly coords: 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 ​

readonly dims: 2 | 3

Defined in: positions/types.ts:252

3 when the nodes differ in z, else 2 (z is then 0).


groups ​

readonly groups: readonly FilePositionGroup[]

Defined in: positions/types.ts:269

Group containers with a box.


medianNodeSize ​

readonly medianNodeSize: number | null

Defined in: positions/types.ts:250

The median node diameter, in units, when the file stores node sizes; else null.


notes ​

readonly notes: readonly PositionNote[]

Defined in: positions/types.ts:271

What could not be read as written.


placed ​

readonly placed: number

Defined in: positions/types.ts:256

The nodes with a position.


pxPerUnit? ​

readonly optional pxPerUnit?: 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 ​

readonly source: 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 ​

readonly format: string

The format that read the file.

tool ​

readonly tool: GraphTool | null

The tool that wrote the file, or null when the file does not say.

yAxis ​

readonly yAxis: YAxis

Which way y grew in the file; every coordinate here has y up.


total ​

readonly total: number

Defined in: positions/types.ts:258

The nodes that need one: every node except group containers the file gives no box.


units ​

readonly units: LengthUnit

Defined in: positions/types.ts:235

The unit of every coordinate and size.


usable ​

readonly usable: 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 ​

readonly version: 1

Defined in: positions/types.ts:224

The shape version of this object.


viewerFit? ​

readonly optional viewerFit?: 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.