0.6.2.0
This commit is contained in:
@@ -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])
|
||||
|
||||
@@ -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 // 连接线垂直高度
|
||||
|
||||
|
||||
Reference in New Issue
Block a user