Skip to content

@graphty/graphty-element / index / NodeScreenPosition

Interface: NodeScreenPosition ​

Defined in: graphty-element/src/Graph.ts:278

Where one node is drawn on screen. Pixels count from the element's top-left corner, the same pixels worldToScreen returns and a pointer event's offsetX / offsetY on the canvas use.

Properties ​

radius ​

radius: number

Defined in: graphty-element/src/Graph.ts:289

The node's radius on screen in pixels: its largest half-extent, projected. 0 behind the camera.


visible ​

visible: boolean

Defined in: graphty-element/src/Graph.ts:287

True when the node is drawn and its centre is on screen: inside the element, in front of the camera and not hidden by a filter. Another node drawn in front of it does not count.


x ​

x: number

Defined in: graphty-element/src/Graph.ts:280

The node's centre, pixels from the element's left edge.


y ​

y: number

Defined in: graphty-element/src/Graph.ts:282

The node's centre, pixels from the element's top edge.