This commit is contained in:
freedakgmail
2025-12-10 13:03:10 +08:00
parent 47be495fcf
commit e7167f4340
153 changed files with 1155 additions and 458 deletions
+5 -5
View File
@@ -323,11 +323,11 @@ const D3OrgChartFlowComponent = forwardRef<D3OrgChartRef, D3OrgChartFlowProps>(
return spouseCount === 0 ? 170 : spouseCount === 1 ? 300 : 170 + spouseCount * 110
}) // 根据配偶数量动态调整宽度
.nodeHeight(() => 175)
.childrenMargin(() => 70)
.compactMarginBetween(() => 50) // 增加间距
.compactMarginPair(() => 50)
.neighbourMargin(() => 50)
.siblingsMargin(() => 50)
.childrenMargin(() => 50)
.compactMarginBetween(() => 20) // 减少间距
.compactMarginPair(() => 20)
.neighbourMargin(() => 20)
.siblingsMargin(() => 20)
.linkUpdate(function (d: any, i: any, arr: any) {
// 现代风格连线 - 使用柔和的灰蓝色
d3.select(arr[i])
+1 -1
View File
@@ -48,7 +48,7 @@ export function TreeLayout({
const [relationDialog, setRelationDialog] = useState<{ member: FamilyMember; type: "child" | "spouse" } | null>(null)
// 节点间距配置
const HORIZONTAL_GAP = 32 // 2rem = 32px
const HORIZONTAL_GAP = 16 // 1rem = 16px
const VERTICAL_GAP = 48 // 3rem = 48px
const CONNECTOR_HEIGHT = 48 // 连接线垂直高度