Skip to content

@graphty/graphty-element / index / NodeEventDetail

Interface: NodeEventDetail ​

Defined in: graphty-element/src/events.ts:454

What a graphty-node-click, graphty-node-hover, graphty-node-drag-start or graphty-node-drag-end DOM event carries.

It is NOT the internal node event. The internal one carries a live Node -- a Babylon mesh, a material and a scene -- and a CustomEvent detail crosses to listeners that may structure-clone it or post it to a worker, where a live handle either throws on the way out or hands a listener something the renderer is about to dispose. So the detail carries the node's ID, and a consumer that wants the record looks it up. This is the same rule the selection and run mirrors follow.

Properties ​

button? ​

optional button?: number

Defined in: graphty-element/src/events.ts:467

Which pointer button produced a click, in the DOM's own numbering.


data? ​

optional data?: Record<string, unknown>

Defined in: graphty-element/src/events.ts:458

The node's own record data, as the importer supplied it. Absent on the drag events.


modifiers? ​

optional modifiers?: object

Defined in: graphty-element/src/events.ts:469

The modifier keys held during a click, for a consumer distinguishing shift-click.

alt ​

alt: boolean

ctrl ​

ctrl: boolean

meta ​

meta: boolean

shift ​

shift: boolean


nodeId ​

nodeId: NodeIdType

Defined in: graphty-element/src/events.ts:456

The node the pointer was on, as session.data.node() takes it.


pinned? ​

optional pinned?: boolean

Defined in: graphty-element/src/events.ts:465

Whether the node is pinned. On graphty-node-drag-start this is the pin as it was when the drag began; on graphty-node-drag-end it is the pin after pinOnDrag has acted.


position? ​

optional position?: object

Defined in: graphty-element/src/events.ts:460

Where the node is in world space. Present on the drag events only.

x ​

x: number

y ​

y: number

z ​

z: number