Skip to content
sigma.js sigma.js
v4.0.6 Docs Examples GitHub 12.2K

evaluateStatePredicate

evaluateStatePredicate<S>(predicate, state): boolean

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

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

S extends object = BaseNodeState

StatePredicate<S>

The shorthand predicate to evaluate

S

The element’s state (node or edge)

boolean

Whether the predicate matches