@flowgram.ai/free-auto-layout-plugin 0.5.4 → 0.5.6

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/index.d.mts CHANGED
@@ -224,6 +224,7 @@ interface LayoutParams {
224
224
  layoutEdges: LayoutEdge[];
225
225
  }
226
226
  interface LayoutOptions {
227
+ layoutConfig?: Partial<LayoutConfig>;
227
228
  containerNode?: WorkflowNodeEntity;
228
229
  getFollowNode?: GetFollowNode;
229
230
  enableAnimation?: boolean;
@@ -271,6 +272,10 @@ interface AutoLayoutOptions {
271
272
  layoutConfig?: Partial<LayoutConfig>;
272
273
  }
273
274
 
275
+ /**
276
+ * Auto layout plugin - 自动布局插件
277
+ * https://flowgram.ai/guide/plugin/free-auto-layout-plugin.html
278
+ */
274
279
  declare const createFreeAutoLayoutPlugin: _flowgram_ai_core.PluginCreator<AutoLayoutOptions>;
275
280
 
276
281
  /**
package/dist/index.d.ts CHANGED
@@ -224,6 +224,7 @@ interface LayoutParams {
224
224
  layoutEdges: LayoutEdge[];
225
225
  }
226
226
  interface LayoutOptions {
227
+ layoutConfig?: Partial<LayoutConfig>;
227
228
  containerNode?: WorkflowNodeEntity;
228
229
  getFollowNode?: GetFollowNode;
229
230
  enableAnimation?: boolean;
@@ -271,6 +272,10 @@ interface AutoLayoutOptions {
271
272
  layoutConfig?: Partial<LayoutConfig>;
272
273
  }
273
274
 
275
+ /**
276
+ * Auto layout plugin - 自动布局插件
277
+ * https://flowgram.ai/guide/plugin/free-auto-layout-plugin.html
278
+ */
274
279
  declare const createFreeAutoLayoutPlugin: _flowgram_ai_core.PluginCreator<AutoLayoutOptions>;
275
280
 
276
281
  /**
package/dist/index.js CHANGED
@@ -2618,7 +2618,11 @@ var AutoLayoutService = class {
2618
2618
  return [];
2619
2619
  }
2620
2620
  const childrenLayouts = (await Promise.all(layoutNodes.map((n) => this.layoutNode(n, options)))).flat();
2621
- const layout2 = new Layout(this.layoutConfig);
2621
+ const layoutConfig = {
2622
+ ...this.layoutConfig,
2623
+ ...options.layoutConfig
2624
+ };
2625
+ const layout2 = new Layout(layoutConfig);
2622
2626
  layout2.init({ container, layoutNodes, layoutEdges }, options);
2623
2627
  layout2.layout();
2624
2628
  const rect = this.getLayoutNodeRect(container);