Skip to content

Commit a22a165

Browse files
authored
doc: Add edit API diagram (openscd#1671)
1 parent 5476bd0 commit a22a165

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

docs/core-api/edit-api-flow.png

64.1 KB
Loading

docs/core-api/edit-api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Open SCD offers an API for editing the scd document which can be used with [Html Custom Events](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent). The main Open SCD components listens to events of the type `oscd-edit-v2`, applies the changes to the `doc` and updates the `editCount` property.
44

5+
![EditApiFlow](./edit-api-flow.png)
6+
57
The edits to the `doc` will be done in place, e.g. the `doc` changes but will keep the same reference. If your plugin needs to react to changes in the doc, you should listen to changes in the `editCount` property.
68

79
## Event factory

0 commit comments

Comments
 (0)