fix: 注释打包异常问题

This commit is contained in:
TsMask
2023-12-15 18:23:59 +08:00
parent 44c05e964e
commit dfe06e2098
2 changed files with 230 additions and 230 deletions

View File

@@ -199,12 +199,12 @@ const data = {
{
id: '0-upf',
source: '0',
target: 'combo-upf',
target: 'combo-upf',
},
{
id: 'upf-1',
source: 'combo-upf',
target: '1',
target: '1',
},
{
@@ -235,22 +235,22 @@ const data = {
{
id: '120-180',
source: '120',
target: '180',
target: '180',
},
{
id: '130-180',
source: '130',
target: '180',
target: '180',
},
{
id: '140-150',
source: '140',
target: '150',
target: '150',
},
{
id: '140-110',
source: '140',
target: '110',
target: '110',
},
{
id: '120-150',
@@ -357,20 +357,20 @@ function initChart() {
modes: {
default: ['drag-canvas', 'zoom-canvas', 'drag-node'], // 允许拖拽画布、放缩画布、拖拽节点
},
// 布局 力向吸引
layout: {
type: 'force', // 指定为力导向布局
preventOverlap: true, // 防止节点重叠
linkDistance: 100, // 指定边距离为100
},
// 插件
plugins: [
{
// 避免文本过于密集导致的视觉混乱
type: 'lod-controller',
disableLod: true,
},
] as any,
// // 布局 力向吸引
// layout: {
// type: 'force', // 指定为力导向布局
// preventOverlap: true, // 防止节点重叠
// linkDistance: 100, // 指定边距离为100
// },
// // 插件
// plugins: [
// {
// // 避免文本过于密集导致的视觉混乱
// type: 'lod-controller',
// disableLod: true,
// },
// ] as any,
// 全局节点 矩形
defaultNode: {
type: 'rect',
@@ -401,40 +401,40 @@ function initChart() {
lineWidth: 1,
},
},
// 节点状态
nodeState: {
breathing: {
haloShape: {
opacity: 0.25,
lineWidth: 20,
visible: true,
},
keyShape: {
radius: 4,
},
},
scaling: {
keyShape: {
width: 100,
height: 60,
},
},
} as any,
edgeState: {
growing: {
keyShape: {
lineWidth: 2,
lineDash: ['100%', 0],
},
},
running: {
keyShape: {
lineWidth: 2,
lineDash: [2, 2],
// TODO: lineDashOffset
},
},
},
// // 节点状态
// nodeState: {
// breathing: {
// haloShape: {
// opacity: 0.25,
// lineWidth: 20,
// visible: true,
// },
// keyShape: {
// radius: 4,
// },
// },
// scaling: {
// keyShape: {
// width: 100,
// height: 60,
// },
// },
// } as any,
// edgeState: {
// growing: {
// keyShape: {
// lineWidth: 2,
// lineDash: ['100%', 0],
// },
// },
// running: {
// keyShape: {
// lineWidth: 2,
// lineDash: [2, 2],
// // TODO: lineDashOffset
// },
// },
// },
});
graph.data(data); // 加载数据