mirror of
https://github.com/cjo4m06/mcp-shrimp-task-manager.git
synced 2025-07-26 07:52:25 +08:00
chore:统一新增注释为中文繁体
This commit is contained in:
parent
378e4393cc
commit
28f9a7c15d
@ -1001,7 +1001,7 @@ function renderDependencyGraph() {
|
||||
.force("charge", d3.forceManyBody().strength(-300))
|
||||
.force("center", d3.forceCenter(width / 2, height / 2))
|
||||
.force("collide", d3.forceCollide().radius(30))
|
||||
// 新增:水平分布力
|
||||
// 新增:水平分布力,用於優化節點在水平方向的分布,根據節點的入度和出度來決定節點的水平位置,入度為0的節點(起始節點)靠左,出度為0的節點(終止節點)靠右,其他節點則分布在中間位置
|
||||
.force("x", d3.forceX().x(d => {
|
||||
// 計算節點的入度和出度
|
||||
const inDegree = links.filter(l => (l.target.id || l.target) === d.id).length;
|
||||
@ -1034,7 +1034,7 @@ function renderDependencyGraph() {
|
||||
g.append("g").attr("class", "links");
|
||||
g.append("g").attr("class", "nodes");
|
||||
} else {
|
||||
// --- 更新渲染 ---
|
||||
// --- 更新圖表渲染 ---
|
||||
console.log("Updating dependency graph");
|
||||
svg.attr("viewBox", [0, 0, width, height]);
|
||||
simulation.force("center", d3.forceCenter(width / 2, height / 2));
|
||||
|
Loading…
x
Reference in New Issue
Block a user