@flowgram.ai/free-layout-core 0.4.1 → 0.4.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.
package/dist/esm/index.js CHANGED
@@ -2425,9 +2425,18 @@ var WorkflowDocument = class extends FlowDocument {
2425
2425
  this._onReloadEmitter.dispose();
2426
2426
  }
2427
2427
  /**
2428
- * 逐层创建节点和线条
2428
+ * 批量添加节点
2429
+ * @deprecated use 'batchAddFromJSON' instead
2430
+ * @param json
2431
+ * @param options
2429
2432
  */
2430
2433
  renderJSON(json, options) {
2434
+ return this.batchAddFromJSON(json, options);
2435
+ }
2436
+ /**
2437
+ * 批量添加节点
2438
+ */
2439
+ batchAddFromJSON(json, options) {
2431
2440
  const { parent = this.root, isClone = false } = options ?? {};
2432
2441
  const containerID = this.getNodeSubCanvas(parent)?.canvasNode.id ?? parent.id;
2433
2442
  const processedJSON = buildGroupJSON(json);