Translate all Chinese comments and strings to English

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-07 20:03:19 +08:00
parent 7d5918837b
commit 1d621bf304
57 changed files with 499 additions and 499 deletions

View File

@@ -31,23 +31,23 @@ export default function cytoscapeMapTrace(nodes, edges, graphId) {
let cy = cytoscape({
container: graphId,
elements: {
nodes: nodes, // 節點的資料
edges: edges, // 關係線的資料
nodes: nodes, // Node data
edges: edges, // Edge data
},
layout: {
name: 'dagre',
rankDir: 'LR' // 直向 TB | 橫向 LR, 'cytoscape-dagre' 套件裡的變數
rankDir: 'LR' // Vertical TB | Horizontal LR, variable from 'cytoscape-dagre' plugin
},
style: [
// node 節點的樣式
// Node styling
{
selector: 'node',
style: {
'label':
function(node) { // 節點要顯示的文字
function(node) { // Text to display on the node
let text = '';
// node.data('label') 為原先陣列 node.data.label
// node.data('label') accesses the original array value at node.data.label
text = node.data('label').length > 18 ? `${node.data('label').substr(0,15)}...` : `${node.data('label')}`;
return text
@@ -67,18 +67,18 @@ export default function cytoscapeMapTrace(nodes, edges, graphId) {
'font-size': 14,
}
},
// edge 關係線的樣式
// Edge styling
{
selector: 'edge',
style: {
'curve-style': 'taxi', // unbundled-bezier | taxi
'target-arrow-shape': 'triangle', // 指向目標的箭頭形狀: 三角形
'target-arrow-shape': 'triangle', // Arrow shape pointing to target: triangle
'color': 'gray', //#0066cc
'width': 'data(lineWidth)',
'line-style': 'data(style)',
}
},
// 點擊 node 後改變的樣式
// Style changes when a node is selected
{
selector: 'node:selected',
style:{