style.setCategoryIcon
setCategoryIcon(category: string, iconName: string): Promise<void>Assign the same icon to all nodes belonging to the given category.
All SetNodeIcon commands are wrapped in a single labeled transaction —
one undo step. Invalidates the store's transaction version to force
icon UV re-resolution on the next render frame.
Emits "style:changed".
category | string | Category name to target. |
iconName | string | Icon identifier from the engine's icon atlas. |
Returns: Promise<void>
Example
await api.style.setCategoryIcon("Person", "person");