chore:统一新增注释为中文繁体

This commit is contained in:
yitacls 2025-06-10 23:00:32 +08:00
parent 378e4393cc
commit 28f9a7c15d

View File

@ -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));