|
|
@@ -4,6 +4,7 @@ import { useMemo } from 'react';
|
|
|
import { createMinimapPlugin } from '@flowgram.ai/minimap-plugin';
|
|
|
import { createFreeSnapPlugin } from '@flowgram.ai/free-snap-plugin';
|
|
|
import { createFreeNodePanelPlugin } from '@flowgram.ai/free-node-panel-plugin';
|
|
|
+import { createFreeLinesPlugin } from '@flowgram.ai/free-lines-plugin';
|
|
|
import { FreeLayoutProps } from '@flowgram.ai/free-layout-editor';
|
|
|
|
|
|
import { FlowNodeRegistry, FlowDocumentJSON } from '../typings';
|
|
|
@@ -11,7 +12,7 @@ import { shortcuts } from '../shortcuts';
|
|
|
import { createVariablePlugin } from '../plugins';
|
|
|
import { defaultFormMeta } from '../nodes/default-form-meta';
|
|
|
import { SelectorBoxPopover } from '../components/selector-box-popover';
|
|
|
-import { BaseNode, NodePanel } from '../components';
|
|
|
+import { BaseNode, LineAddButton, NodePanel } from '../components';
|
|
|
|
|
|
export function useEditorProps(
|
|
|
initialData: FlowDocumentJSON,
|
|
|
@@ -124,6 +125,13 @@ export function useEditorProps(
|
|
|
console.log('---- Playground Dispose ----');
|
|
|
},
|
|
|
plugins: () => [
|
|
|
+ /**
|
|
|
+ * Line render plugin
|
|
|
+ * 连线渲染插件
|
|
|
+ */
|
|
|
+ createFreeLinesPlugin({
|
|
|
+ renderInsideLine: LineAddButton,
|
|
|
+ }),
|
|
|
/**
|
|
|
* Minimap plugin
|
|
|
* 缩略图插件
|