@shumoku/core · 0.6.1 · function
applyGraphEdits
Writes the edits made to a drawn graph back into the model it was drawn from. `drawn` is the graph as it was before the edits and `edited` as it is after; only what differs between them is written. The configuration keeps what the graph cannot say, such as a node's software or the host a VM runs on, and a field the graph draws from another (a product's name, a link's speed) is kept as written until that field is edited. The drawing of an edited element is replaced, as the graph says all of it. A graph carries nothing of the observation record, so none is written. Without an edit, the model itself is returned.
applyGraphEdits(model: NetworkModel, drawn: NetworkGraph, edited: NetworkGraph): NetworkModel Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
model | NetworkModel | No additional description. | — |
drawn | NetworkGraph | No additional description. | — |
edited | NetworkGraph | No additional description. | — |
Returns
NetworkModel libs/@shumoku/core/src/libs/@shumoku/core/src/models/network-model-edit.ts:24