set Feature State Expression
Sets a feature state expression that applies to features within the specified featureset.
All feature states with expressions that evaluate to true will be applied to the feature. Feature states from later added feature state expressions have higher priority. Regular feature states have higher priority than feature state expressions. The final feature state is determined by applying states in order from lower to higher priority. As a result, multiple expressions that set states with different keys can affect the same features simultaneously. If an expression is added for a feature set, properties from that feature set are used, not the properties from original sources.
Note that feature state expressions are evaluated asynchronously, so visual changes may appear a few frames later, even after the callback is called.
Parameters
Unique identifier for the state expression.
The featureset descriptor that specifies which featureset the expression applies to.
The expression to evaluate for the state. Should return boolean.
The state object with properties to update with their respective new values.
The feature state operation callback called when the operation completes.