Skip to content
This is the alpha v4 version website. Looking for the v3 documentation?

evaluateNodeStyle

evaluateNodeStyle<NA, NS, GS>(styleDeclaration, attributes, state, graphState, graph, target?): NodeDisplayData

Defined in: packages/sigma/src/core/styles.ts:563

Evaluates a complete node style declaration for a specific node. Writes results directly into the target NodeDisplayData (or a fresh object if not provided). Does not set highlighted — that must be assigned by the caller from node state.

Type Parameters

NA

NA extends Attributes = Attributes

NS

NS extends BaseNodeState = BaseNodeState

GS

GS extends BaseGraphState = BaseGraphState

Parameters

styleDeclaration

Record<string, unknown> | Record<string, unknown>[] | undefined

The style declaration (object or array of rules)

attributes

NA

The node’s attributes

state

NS

The node’s state

graphState

GS

The graph-level state

graph

AbstractGraph

The graph instance

target?

NodeDisplayData

Optional existing NodeDisplayData to write into (avoids allocation)

Returns

NodeDisplayData

The populated NodeDisplayData