Skip to main content

update()

updates properties of the item

updateUrl?: (id: string | number, newItem: IUpdateObject) => void;

Parameters:

  • id: string | number - the id of the item which needs to be updated
  • newItem: object - a hash of properties which need to be updated

Example

diagram.data.update(123, { text:"New text" });

The command can't be used to change the id or type of the item.

Updating an item