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

evaluateStatePredicate

evaluateStatePredicate<S>(predicate, state): boolean

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

Evaluates a state predicate (shorthand form) against the current state. For function predicates, use when in style rules or InlineFunctionConditional for inline values.

Type Parameters

S

S extends object = BaseNodeState

Parameters

predicate

StatePredicate<S>

The shorthand predicate to evaluate

state

S

The element’s state (node or edge)

Returns

boolean

Whether the predicate matches