+
jumpover — jumpDirection 演示
+
+ jumpDirection:
+ {(['both', 'horizontal', 'vertical'] as JumpDirection[]).map((v) => (
+
+ ))}
+
+
+ {direction === 'both' &&
+ '两条线交叉时,先绘制的那条(水平/垂直均可)会产生跳弧。'}
+ {direction === 'horizontal' &&
+ '只有水平线(A→B,蓝色)在交叉处产生跳弧;垂直线(C→D,红色)直线穿过。'}
+ {direction === 'vertical' &&
+ '只有垂直线(C→D,红色)在交叉处产生跳弧;水平线(A→B,蓝色)直线穿过。'}
+
+
+
+ )
+}
+
+export default JumpoverDirectionExample
diff --git a/examples/src/pages/index.tsx b/examples/src/pages/index.tsx
index 345aad7bcf9..908f7b357bf 100755
--- a/examples/src/pages/index.tsx
+++ b/examples/src/pages/index.tsx
@@ -103,6 +103,10 @@ const dataSource = [
example: 'connector/xmind-curve',
description: '脑图连接器',
},
+ {
+ example: 'connector/jumpover-direction',
+ description: 'jumpover jumpDirection 演示',
+ },
// ========= tools =========
{
example: 'tools/clean',
diff --git a/src/registry/connector/jumpover.ts b/src/registry/connector/jumpover.ts
index ee8957cff13..86ed706f3a3 100644
--- a/src/registry/connector/jumpover.ts
+++ b/src/registry/connector/jumpover.ts
@@ -295,6 +295,7 @@ export interface JumpoverConnectorOptions extends ConnectorBaseOptions {
radius?: number
type?: JumpType
ignoreConnectors?: string[]
+ jumpDirection?: 'both' | 'horizontal' | 'vertical'
}
export const jumpover: ConnectorDefinition