update_elements
Patch existing Excalidraw elements by ID to change properties, re-measure text, move bound labels and arrows, and sync edits to live collaborators; other agents' elements are protected unless forced.
Instructions
Patch existing elements by id. 'set' is merged over the element; version and nonce are bumped. 'set' accepts any element field, including link (a URL, or null to remove it). Changing 'text' or 'fontSize' on a text element re-measures it unless width/height are given, keeps originalText in step, and, for a label bound to a shape, re-centres it and grows the shape to fit so the canvas redraws the new label. Changing 'x', 'y', 'width' or 'height' carries the element's bound label with it and re-computes the endpoint of every arrow bound to it, leaving each arrow's other end alone; use translate_elements to move a shape with its group, its frame's children and the arrows between moved shapes. An element another agent in the room drew is left alone and reported as refused unless force is true; a person's elements and those of an agent that has left are never guarded. The change reaches connected peers immediately and the room's stored copy shortly after; a result line beginning NOT PERSISTED means the stored copy is behind and the server is retrying in the background.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Edit elements another agent in the room drew anyway. Without it those ids are skipped and reported as refused, so the agent still working on them keeps a true picture of the scene. | |
| updates | Yes |