@logicflow/core 2.2.1 → 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/README.md +32 -0
  2. package/dist/docs/api/logicflow-constructor/index.en.md +106 -0
  3. package/dist/docs/api/logicflow-constructor/index.zh.md +106 -0
  4. package/dist/docs/api/logicflow-constructor/use.en.md +61 -0
  5. package/dist/docs/api/logicflow-constructor/use.zh.md +61 -0
  6. package/dist/docs/api/logicflow-instance/canvas.en.md +197 -0
  7. package/dist/docs/api/logicflow-instance/canvas.zh.md +199 -0
  8. package/dist/docs/api/logicflow-instance/edge.en.md +273 -0
  9. package/dist/docs/api/logicflow-instance/edge.zh.md +273 -0
  10. package/dist/docs/api/logicflow-instance/edit-config.en.md +59 -0
  11. package/dist/docs/api/logicflow-instance/edit-config.zh.md +59 -0
  12. package/dist/docs/api/logicflow-instance/element.en.md +375 -0
  13. package/dist/docs/api/logicflow-instance/element.zh.md +379 -0
  14. package/dist/docs/api/logicflow-instance/event.en.md +326 -0
  15. package/dist/docs/api/logicflow-instance/event.zh.md +406 -0
  16. package/dist/docs/api/logicflow-instance/history.en.md +38 -0
  17. package/dist/docs/api/logicflow-instance/history.zh.md +38 -0
  18. package/dist/docs/api/logicflow-instance/index.en.md +41 -0
  19. package/dist/docs/api/logicflow-instance/index.zh.md +41 -0
  20. package/dist/docs/api/logicflow-instance/node.en.md +308 -0
  21. package/dist/docs/api/logicflow-instance/node.zh.md +308 -0
  22. package/dist/docs/api/logicflow-instance/register.en.md +76 -0
  23. package/dist/docs/api/logicflow-instance/register.zh.md +76 -0
  24. package/dist/docs/api/logicflow-instance/render-and-data.en.md +179 -0
  25. package/dist/docs/api/logicflow-instance/render-and-data.zh.md +181 -0
  26. package/dist/docs/api/logicflow-instance/text.en.md +60 -0
  27. package/dist/docs/api/logicflow-instance/text.zh.md +60 -0
  28. package/dist/docs/api/logicflow-instance/theme.en.md +179 -0
  29. package/dist/docs/api/logicflow-instance/theme.zh.md +179 -0
  30. package/dist/docs/api/runtime-model/edgeModel.en.md +29 -0
  31. package/dist/docs/api/runtime-model/edgeModel.zh.md +325 -0
  32. package/dist/docs/api/runtime-model/graphModel.en.md +275 -0
  33. package/dist/docs/api/runtime-model/graphModel.zh.md +1153 -0
  34. package/dist/docs/api/runtime-model/nodeModel.en.md +37 -0
  35. package/dist/docs/api/runtime-model/nodeModel.zh.md +644 -0
  36. package/dist/docs/api/type/MainTypes.en.md +598 -0
  37. package/dist/docs/api/type/MainTypes.zh.md +867 -0
  38. package/dist/docs/api/type/Theme.en.md +187 -0
  39. package/dist/docs/api/type/Theme.zh.md +187 -0
  40. package/dist/docs/api/type/canvas-types.en.md +25 -0
  41. package/dist/docs/api/type/canvas-types.zh.md +25 -0
  42. package/dist/docs/api/type/index.en.md +96 -0
  43. package/dist/docs/api/type/index.zh.md +99 -0
  44. package/dist/docs/api/type/node-types.en.md +21 -0
  45. package/dist/docs/api/type/node-types.zh.md +21 -0
  46. package/dist/docs/api/type/plugin-types.en.md +24 -0
  47. package/dist/docs/api/type/plugin-types.zh.md +24 -0
  48. package/dist/docs/index.md +11 -0
  49. package/dist/docs/tutorial/about.en.md +38 -0
  50. package/dist/docs/tutorial/about.zh.md +65 -0
  51. package/dist/docs/tutorial/advanced/dnd.en.md +62 -0
  52. package/dist/docs/tutorial/advanced/dnd.zh.md +52 -0
  53. package/dist/docs/tutorial/advanced/edge.en.md +64 -0
  54. package/dist/docs/tutorial/advanced/edge.zh.md +66 -0
  55. package/dist/docs/tutorial/advanced/keyboard.en.md +70 -0
  56. package/dist/docs/tutorial/advanced/keyboard.zh.md +67 -0
  57. package/dist/docs/tutorial/advanced/node.en.md +338 -0
  58. package/dist/docs/tutorial/advanced/node.zh.md +338 -0
  59. package/dist/docs/tutorial/advanced/react.en.md +106 -0
  60. package/dist/docs/tutorial/advanced/react.zh.md +114 -0
  61. package/dist/docs/tutorial/advanced/silent-mode.en.md +75 -0
  62. package/dist/docs/tutorial/advanced/silent-mode.zh.md +71 -0
  63. package/dist/docs/tutorial/advanced/snapline.en.md +54 -0
  64. package/dist/docs/tutorial/advanced/vue.en.md +249 -0
  65. package/dist/docs/tutorial/advanced/vue.zh.md +248 -0
  66. package/dist/docs/tutorial/ai.en.md +64 -0
  67. package/dist/docs/tutorial/ai.zh.md +64 -0
  68. package/dist/docs/tutorial/basic/background.en.md +50 -0
  69. package/dist/docs/tutorial/basic/canvas.en.md +164 -0
  70. package/dist/docs/tutorial/basic/canvas.zh.md +183 -0
  71. package/dist/docs/tutorial/basic/class.en.md +106 -0
  72. package/dist/docs/tutorial/basic/class.zh.md +103 -0
  73. package/dist/docs/tutorial/basic/edge.en.md +151 -0
  74. package/dist/docs/tutorial/basic/edge.zh.md +152 -0
  75. package/dist/docs/tutorial/basic/event.en.md +70 -0
  76. package/dist/docs/tutorial/basic/event.zh.md +66 -0
  77. package/dist/docs/tutorial/basic/grid.en.md +77 -0
  78. package/dist/docs/tutorial/basic/node.en.md +358 -0
  79. package/dist/docs/tutorial/basic/node.zh.md +318 -0
  80. package/dist/docs/tutorial/basic/theme.en.md +154 -0
  81. package/dist/docs/tutorial/basic/theme.zh.md +157 -0
  82. package/dist/docs/tutorial/extension/adapter.en.md +446 -0
  83. package/dist/docs/tutorial/extension/adapter.zh.md +429 -0
  84. package/dist/docs/tutorial/extension/bpmn-element.en.md +1427 -0
  85. package/dist/docs/tutorial/extension/bpmn-element.zh.md +1472 -0
  86. package/dist/docs/tutorial/extension/control.en.md +117 -0
  87. package/dist/docs/tutorial/extension/control.zh.md +118 -0
  88. package/dist/docs/tutorial/extension/curved-edge.en.md +46 -0
  89. package/dist/docs/tutorial/extension/curved-edge.zh.md +46 -0
  90. package/dist/docs/tutorial/extension/custom.en.md +142 -0
  91. package/dist/docs/tutorial/extension/custom.zh.md +138 -0
  92. package/dist/docs/tutorial/extension/dnd-panel.en.md +109 -0
  93. package/dist/docs/tutorial/extension/dnd-panel.zh.md +109 -0
  94. package/dist/docs/tutorial/extension/dynamic-group.en.md +606 -0
  95. package/dist/docs/tutorial/extension/dynamic-group.zh.md +606 -0
  96. package/dist/docs/tutorial/extension/group.en.md +217 -0
  97. package/dist/docs/tutorial/extension/group.zh.md +209 -0
  98. package/dist/docs/tutorial/extension/highlight.en.md +50 -0
  99. package/dist/docs/tutorial/extension/highlight.zh.md +50 -0
  100. package/dist/docs/tutorial/extension/insert-node-in-polyline.en.md +52 -0
  101. package/dist/docs/tutorial/extension/insert-node-in-polyline.zh.md +47 -0
  102. package/dist/docs/tutorial/extension/intro.en.md +72 -0
  103. package/dist/docs/tutorial/extension/intro.zh.md +95 -0
  104. package/dist/docs/tutorial/extension/label.en.md +136 -0
  105. package/dist/docs/tutorial/extension/label.zh.md +135 -0
  106. package/dist/docs/tutorial/extension/layout.en.md +156 -0
  107. package/dist/docs/tutorial/extension/layout.zh.md +156 -0
  108. package/dist/docs/tutorial/extension/menu.en.md +319 -0
  109. package/dist/docs/tutorial/extension/menu.zh.md +377 -0
  110. package/dist/docs/tutorial/extension/minimap.en.md +164 -0
  111. package/dist/docs/tutorial/extension/minimap.zh.md +180 -0
  112. package/dist/docs/tutorial/extension/node-resize.en.md +199 -0
  113. package/dist/docs/tutorial/extension/node-resize.zh.md +221 -0
  114. package/dist/docs/tutorial/extension/pool.en.md +227 -0
  115. package/dist/docs/tutorial/extension/pool.zh.md +227 -0
  116. package/dist/docs/tutorial/extension/proximity-connect.en.md +104 -0
  117. package/dist/docs/tutorial/extension/proximity-connect.zh.md +107 -0
  118. package/dist/docs/tutorial/extension/selection.en.md +166 -0
  119. package/dist/docs/tutorial/extension/selection.zh.md +150 -0
  120. package/dist/docs/tutorial/extension/snapshot.en.md +276 -0
  121. package/dist/docs/tutorial/extension/snapshot.zh.md +276 -0
  122. package/dist/docs/tutorial/get-started.en.md +501 -0
  123. package/dist/docs/tutorial/get-started.zh.md +139 -0
  124. package/dist/docs/tutorial/update.en.md +213 -0
  125. package/dist/docs/tutorial/update.zh.md +212 -0
  126. package/package.json +5 -3
  127. package/scripts/postinstall-ai-prompt.js +67 -0
@@ -0,0 +1,59 @@
1
+ ---
2
+ nav: API
3
+ group:
4
+ title: LogicFlow Instance
5
+ order: 2
6
+ title: Edit configuration
7
+ toc: content
8
+ order: 11
9
+ ---
10
+
11
+ This page documents instance APIs for reading and updating edit configuration.
12
+
13
+ ### updateEditConfig
14
+
15
+ Merge partial updates into the active edit configuration.
16
+
17
+ **Signature**
18
+
19
+ ```ts
20
+ updateEditConfig(config: Partial<IEditConfigType>): void
21
+ ```
22
+
23
+ **Parameters**
24
+
25
+ | Name | Type | Required | Description |
26
+ | :------ | :--- | :------- | :---------- |
27
+ | `config` | [`Partial<IEditConfigType>`](../type/MainTypes.en.md#ieditconfigtype-edit-control) | Yes | Fields to update. |
28
+
29
+ **Example**
30
+
31
+ ```ts
32
+ lf.updateEditConfig({
33
+ stopZoomGraph: true,
34
+ });
35
+ ```
36
+
37
+ ### getEditConfig
38
+
39
+ Return the current edit configuration.
40
+
41
+ **Signature**
42
+
43
+ ```ts
44
+ getEditConfig(): IEditConfigType
45
+ ```
46
+
47
+ **Returns**
48
+
49
+ | Type | Description |
50
+ | :--- | :---------- |
51
+ | [`IEditConfigType`](../type/MainTypes.en.md#ieditconfigtype-edit-control) | Active configuration for this instance. |
52
+
53
+ **Example**
54
+
55
+ ```ts
56
+ lf.getEditConfig();
57
+ ```
58
+
59
+ Field definitions: [IEditConfigType](../type/MainTypes.en.md#ieditconfigtype-edit-control). `editConfigModel` methods: [graphModel → editConfigModel](../runtime-model/graphModel.en.md#editconfigmodel).
@@ -0,0 +1,59 @@
1
+ ---
2
+ nav: API
3
+ group:
4
+ title: LogicFlow 实例
5
+ order: 2
6
+ title: 编辑控制
7
+ toc: content
8
+ order: 11
9
+ ---
10
+
11
+ 本页汇总 LogicFlow 实例中与编辑配置读写相关的方法。
12
+
13
+ ### updateEditConfig
14
+
15
+ 更新流程编辑基础配置。
16
+
17
+ **签名**
18
+
19
+ ```ts
20
+ updateEditConfig(config: Partial<IEditConfigType>): void
21
+ ```
22
+
23
+ **参数**
24
+
25
+ | 名称 | 类型 | 必传 | 说明 |
26
+ | :--- | :--- | :--- | :--- |
27
+ | `config` | [`Partial<IEditConfigType>`](../type/MainTypes.zh.md#ieditconfigtype编辑控制配置) | 是 | 需要更新的编辑控制配置。 |
28
+
29
+ **示例**
30
+
31
+ ```ts
32
+ lf.updateEditConfig({
33
+ stopZoomGraph: true,
34
+ });
35
+ ```
36
+
37
+ ### getEditConfig
38
+
39
+ 获取当前流程编辑基础配置。
40
+
41
+ **签名**
42
+
43
+ ```ts
44
+ getEditConfig(): IEditConfigType
45
+ ```
46
+
47
+ **返回值**
48
+
49
+ | 类型 | 说明 |
50
+ | :--- | :--- |
51
+ | [`IEditConfigType`](../type/MainTypes.zh.md#ieditconfigtype编辑控制配置) | 当前实例生效的编辑控制配置。 |
52
+
53
+ **示例**
54
+
55
+ ```ts
56
+ lf.getEditConfig();
57
+ ```
58
+
59
+ 配置字段说明见 [IEditConfigType](../type/MainTypes.zh.md#ieditconfigtype编辑控制配置)。`editConfigModel` 的方法与模型说明见 [graphModel → editConfigModel](../runtime-model/graphModel.zh.md#editconfigmodel)。
@@ -0,0 +1,375 @@
1
+ ---
2
+ nav: API
3
+ group:
4
+ title: LogicFlow Instance
5
+ order: 2
6
+ title: Elements
7
+ toc: content
8
+ order: 4
9
+ ---
10
+
11
+ This page documents batch operations, selection helpers, and property utilities that work on both nodes and edges.
12
+
13
+ ### addElements
14
+
15
+ Adds many nodes and edges at once.
16
+
17
+ **Signature**
18
+
19
+ ```ts
20
+ addElements(data: GraphData): void
21
+ ```
22
+
23
+ **Parameters**
24
+
25
+ | Name | Type | Required | Description |
26
+ | :--- | :--- | :--- | :--- |
27
+ | `data` | [`GraphData`](../type/MainTypes.en.md#graphdata) | Yes | Nodes and edges to insert. |
28
+
29
+ **Example**
30
+
31
+ ```ts
32
+ lf.addElements({
33
+ nodes: [{ id: 'node_1', type: 'rect', x: 100, y: 100 }],
34
+ edges: [],
35
+ });
36
+ ```
37
+
38
+ ### selectElementById
39
+
40
+ Selects a node or edge.
41
+
42
+ **Signature**
43
+
44
+ ```ts
45
+ selectElementById(id: string, multiple?: boolean, toFront?: boolean): BaseNodeModel | BaseEdgeModel
46
+ ```
47
+
48
+ **Parameters**
49
+
50
+ | Name | Type | Required | Description |
51
+ | :--- | :--- | :--- | :--- |
52
+ | `id` | `string` | Yes | Element id. |
53
+ | `multiple` | `boolean` | No | Keep previous selection when `true`. |
54
+ | `toFront` | `boolean` | No | Promote z-order after selection. |
55
+
56
+ **Returns**
57
+
58
+ | Type | Description |
59
+ | :--- | :--- |
60
+ | `BaseNodeModel \| BaseEdgeModel` | Selected model. |
61
+
62
+ **Example**
63
+
64
+ ```ts
65
+ lf.selectElementById('node_1', true, true);
66
+ ```
67
+
68
+ ### deselectElementById
69
+
70
+ Clears selection for one element.
71
+
72
+ **Signature**
73
+
74
+ ```ts
75
+ deselectElementById(id: string): void
76
+ ```
77
+
78
+ **Parameters**
79
+
80
+ | Name | Type | Required | Description |
81
+ | :--- | :--- | :--- | :--- |
82
+ | `id` | `string` | Yes | Element id. |
83
+
84
+ **Example**
85
+
86
+ ```ts
87
+ lf.deselectElementById('node_1');
88
+ ```
89
+
90
+ ### getSelectElements
91
+
92
+ Exports currently selected elements as graph configuration data.
93
+
94
+ **Signature**
95
+
96
+ ```ts
97
+ getSelectElements(isIgnoreCheck?: boolean): GraphConfigData
98
+ ```
99
+
100
+ **Parameters**
101
+
102
+ | Name | Type | Required | Description |
103
+ | :--- | :--- | :--- | :--- |
104
+ | `isIgnoreCheck` | `boolean` | No | When `false`, omits edges whose endpoints are not both selected (useful for copy). |
105
+
106
+ **Returns**
107
+
108
+ | Type | Description |
109
+ | :--- | :--- |
110
+ | [`GraphConfigData`](../type/MainTypes.en.md#graphconfigdata) | Selection payload. |
111
+
112
+ **Example**
113
+
114
+ ```ts
115
+ lf.getSelectElements(false);
116
+ ```
117
+
118
+ ### clearSelectElements
119
+
120
+ Clears the entire selection.
121
+
122
+ **Signature**
123
+
124
+ ```ts
125
+ clearSelectElements(): void
126
+ ```
127
+
128
+ **Example**
129
+
130
+ ```ts
131
+ lf.clearSelectElements();
132
+ ```
133
+
134
+ ### getModelById
135
+
136
+ Looks up a node or edge model.
137
+
138
+ **Signature**
139
+
140
+ ```ts
141
+ getModelById(id: string): BaseNodeModel | BaseEdgeModel | undefined
142
+ ```
143
+
144
+ **Parameters**
145
+
146
+ | Name | Type | Required | Description |
147
+ | :--- | :--- | :--- | :--- |
148
+ | `id` | `string` | Yes | Element id. |
149
+
150
+ **Returns**
151
+
152
+ | Type | Description |
153
+ | :--- | :--- |
154
+ | `BaseNodeModel \| BaseEdgeModel \| undefined` | Model instance. |
155
+
156
+ **Example**
157
+
158
+ ```ts
159
+ lf.getModelById('node_id');
160
+ lf.getModelById('edge_id');
161
+ ```
162
+
163
+ ### getDataById
164
+
165
+ Returns plain config data for a node or edge.
166
+
167
+ **Signature**
168
+
169
+ ```ts
170
+ getDataById(id: string): NodeConfig | EdgeConfig | undefined
171
+ ```
172
+
173
+ **Parameters**
174
+
175
+ | Name | Type | Required | Description |
176
+ | :--- | :--- | :--- | :--- |
177
+ | `id` | `string` | Yes | Element id. |
178
+
179
+ **Returns**
180
+
181
+ | Type | Description |
182
+ | :--- | :--- |
183
+ | [`NodeConfig`](../type/MainTypes.en.md#nodeconfig) \| [`EdgeConfig`](../type/MainTypes.en.md#edgeconfig) \| `undefined` | Data snapshot. |
184
+
185
+ ### deleteElement
186
+
187
+ Deletes a node or edge.
188
+
189
+ **Signature**
190
+
191
+ ```ts
192
+ deleteElement(id: string): boolean
193
+ ```
194
+
195
+ **Parameters**
196
+
197
+ | Name | Type | Required | Description |
198
+ | :--- | :--- | :--- | :--- |
199
+ | `id` | `string` | Yes | Element id. |
200
+
201
+ **Returns**
202
+
203
+ | Type | Description |
204
+ | :--- | :--- |
205
+ | `boolean` | Whether deletion succeeded. |
206
+
207
+ **Example**
208
+
209
+ ```ts
210
+ lf.deleteElement('node_id');
211
+ ```
212
+
213
+ ### setElementZIndex
214
+
215
+ Sets stacking order for an element.
216
+
217
+ **Signature**
218
+
219
+ ```ts
220
+ setElementZIndex(id: string, zIndex: string | number): void
221
+ ```
222
+
223
+ **Parameters**
224
+
225
+ | Name | Type | Required | Description |
226
+ | :--- | :--- | :--- | :--- |
227
+ | `id` | `string` | Yes | Element id. |
228
+ | `zIndex` | `string \| number` | Yes | Numeric index or `'top'` / `'bottom'`. |
229
+
230
+ **Example**
231
+
232
+ ```ts
233
+ lf.setElementZIndex('element_id', 'top');
234
+ ```
235
+
236
+ ### getAreaElement
237
+
238
+ Returns models intersecting a canvas rectangle.
239
+
240
+ **Signature**
241
+
242
+ ```ts
243
+ getAreaElement(
244
+ leftTopPoint: PointTuple,
245
+ rightBottomPoint: PointTuple,
246
+ wholeEdge?: boolean,
247
+ wholeNode?: boolean,
248
+ ignoreHideElement?: boolean
249
+ ): (BaseNodeModel | BaseEdgeModel)[]
250
+ ```
251
+
252
+ **Parameters**
253
+
254
+ | Name | Type | Required | Description |
255
+ | :--- | :--- | :--- | :--- |
256
+ | `leftTopPoint` | `PointTuple` | Yes | Upper-left corner. |
257
+ | `rightBottomPoint` | `PointTuple` | Yes | Lower-right corner. |
258
+ | `wholeEdge` | `boolean` | No | Require the entire edge inside the box. |
259
+ | `wholeNode` | `boolean` | No | Require the entire node inside the box. |
260
+ | `ignoreHideElement` | `boolean` | No | Skip hidden elements. |
261
+
262
+ **Returns**
263
+
264
+ | Type | Description |
265
+ | :--- | :--- |
266
+ | `(BaseNodeModel \| BaseEdgeModel)[]` | Hits. |
267
+
268
+ **Example**
269
+
270
+ ```ts
271
+ lf.getAreaElement([100, 100], [500, 500]);
272
+ ```
273
+
274
+ ### setProperties
275
+
276
+ Sets custom `properties` on a node or edge.
277
+
278
+ **Signature**
279
+
280
+ ```ts
281
+ setProperties(id: string, properties: Record<string, unknown>): void
282
+ ```
283
+
284
+ **Parameters**
285
+
286
+ | Name | Type | Required | Description |
287
+ | :--- | :--- | :--- | :--- |
288
+ | `id` | `string` | Yes | Element id. |
289
+ | `properties` | `Record<string, unknown>` | Yes | Property bag. |
290
+
291
+ **Example**
292
+
293
+ ```ts
294
+ lf.setProperties('aF2Md2P23moN2gasd', {
295
+ isRollbackNode: true,
296
+ });
297
+ ```
298
+
299
+ ### getProperties
300
+
301
+ Reads the custom property object.
302
+
303
+ **Signature**
304
+
305
+ ```ts
306
+ getProperties(id: string): Record<string, any>
307
+ ```
308
+
309
+ **Parameters**
310
+
311
+ | Name | Type | Required | Description |
312
+ | :--- | :--- | :--- | :--- |
313
+ | `id` | `string` | Yes | Element id. |
314
+
315
+ **Returns**
316
+
317
+ | Type | Description |
318
+ | :--- | :--- |
319
+ | `Record<string, any>` | Properties map. |
320
+
321
+ **Example**
322
+
323
+ ```ts
324
+ lf.getProperties('id');
325
+ ```
326
+
327
+ ### deleteProperty
328
+
329
+ Removes a single key from `properties`.
330
+
331
+ **Signature**
332
+
333
+ ```ts
334
+ deleteProperty(id: string, key: string): void
335
+ ```
336
+
337
+ **Parameters**
338
+
339
+ | Name | Type | Required | Description |
340
+ | :--- | :--- | :--- | :--- |
341
+ | `id` | `string` | Yes | Element id. |
342
+ | `key` | `string` | Yes | Property key. |
343
+
344
+ **Example**
345
+
346
+ ```ts
347
+ lf.deleteProperty('aF2Md2P23moN2gasd', 'isRollbackNode');
348
+ ```
349
+
350
+ ### updateAttributes
351
+
352
+ Low-level patch against model fields; delegates to [`graphModel.updateAttributes`](../runtime-model/graphModel.en.md#updateattributes).
353
+
354
+ :::warning{title=Note}
355
+ Prefer higher-level helpers (`setProperties`, `updateText`, `changeNodeId`, …). Changing ids or geometry incorrectly can break edges.
356
+ :::
357
+
358
+ **Signature**
359
+
360
+ ```ts
361
+ updateAttributes(id: string, attributes: object): void
362
+ ```
363
+
364
+ **Parameters**
365
+
366
+ | Name | Type | Required | Description |
367
+ | :--- | :--- | :--- | :--- |
368
+ | `id` | `string` | Yes | Element id. |
369
+ | `attributes` | `object` | Yes | Fields to merge into the model. |
370
+
371
+ **Example**
372
+
373
+ ```ts
374
+ lf.updateAttributes('node_id_1', { radius: 4 });
375
+ ```