style

style.setEdgeShape

setEdgeShape(shape: EdgeShape): Promise<void>

Set the shape of all edges in the graph globally.

Writes the value to store.defaultEdgeShape (renderer's defaultEdgeShape shader uniform — picked up by every edge whose per-edge _edgeState.shapes[i] is -1, including edges added later) AND applies a per-edge SetEdgeShapeCommand for every existing edge (so the change is undoable). Wrapped in a single labeled transaction. Does not emit "style:changed".

The default-write is what makes calling order safe — e.g. on view restore where settings dispatch before edges land in the store, the later-added edges still inherit the chosen shape via the shader fallback path.

shapeEdgeShapeThe edge shape to apply universally.

Returns: Promise<void>

Example

await api.style.setEdgeShape("curve");