Files
lan-manager/web/node_modules/@antv/g6-pc/es/global.js
openclaw 0a5f6a8047 Initial commit: Lan-manager project code
- Go backend (server/)
- Frontend (web/, server/static/)
- Database and deployment files
- Scripts and docs

Co-Authored-By: 狸花猫/Claude-Qwen3.6-Plus 🐾
2026-04-20 00:52:58 +08:00

221 lines
5.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { getColorsWithSubjectColor } from './util/color';
var subjectColor = 'rgb(95, 149, 255)';
var backColor = 'rgb(255, 255, 255)';
var textColor = 'rgb(0, 0, 0)';
var colorSet = getColorsWithSubjectColor(subjectColor, backColor);
export default {
version: '0.8.23',
rootContainerClassName: 'root-container',
nodeContainerClassName: 'node-container',
edgeContainerClassName: 'edge-container',
comboContainerClassName: 'combo-container',
delegateContainerClassName: 'delegate-container',
defaultLoopPosition: 'top',
nodeLabel: {
style: {
fill: '#000',
fontSize: 12,
textAlign: 'center',
textBaseline: 'middle'
},
offset: 4 // 节点的默认文本不居中时的偏移量
},
defaultNode: {
type: 'circle',
style: {
lineWidth: 1,
stroke: colorSet.mainStroke,
fill: colorSet.mainFill
},
size: 20,
color: colorSet.mainStroke,
linkPoints: {
size: 8,
lineWidth: 1,
fill: colorSet.activeFill,
stroke: colorSet.activeStroke
}
},
// 节点应用状态后的样式,默认仅提供 active、selected、highlight、inactive、disable用户可以自己扩展
nodeStateStyles: {
active: {
fill: colorSet.activeFill,
stroke: colorSet.activeStroke,
lineWidth: 2,
shadowColor: colorSet.mainStroke,
shadowBlur: 10
},
selected: {
fill: colorSet.selectedFill,
stroke: colorSet.selectedStroke,
lineWidth: 4,
shadowColor: colorSet.selectedStroke,
shadowBlur: 10,
'text-shape': {
fontWeight: 500
}
},
highlight: {
fill: colorSet.highlightFill,
stroke: colorSet.highlightStroke,
lineWidth: 2,
'text-shape': {
fontWeight: 500
}
},
inactive: {
fill: colorSet.inactiveFill,
stroke: colorSet.inactiveStroke,
lineWidth: 1
},
disable: {
fill: colorSet.disableFill,
stroke: colorSet.disableStroke,
lineWidth: 1
}
},
edgeLabel: {
style: {
fill: textColor,
textAlign: 'center',
textBaseline: 'middle',
fontSize: 12
}
},
defaultEdge: {
type: 'line',
size: 1,
style: {
stroke: colorSet.edgeMainStroke,
lineAppendWidth: 2
},
color: colorSet.edgeMainStroke
},
// 边应用状态后的样式,默认仅提供 active、selected、highlight、inactive、disable用户可以自己扩展
edgeStateStyles: {
active: {
stroke: colorSet.edgeActiveStroke,
lineWidth: 1
},
selected: {
stroke: colorSet.edgeSelectedStroke,
lineWidth: 2,
shadowColor: colorSet.edgeSelectedStroke,
shadowBlur: 10,
'text-shape': {
fontWeight: 500
}
},
highlight: {
stroke: colorSet.edgeHighlightStroke,
lineWidth: 2,
'text-shape': {
fontWeight: 500
}
},
inactive: {
stroke: colorSet.edgeInactiveStroke,
lineWidth: 1
},
disable: {
stroke: colorSet.edgeDisableStroke,
lineWidth: 1
}
},
comboLabel: {
style: {
fill: textColor,
// textAlign: 'center',
textBaseline: 'middle',
fontSize: 12
},
refY: 10,
refX: 10 // Combo 的默认文本不居中时的偏移量
},
defaultCombo: {
type: 'circle',
style: {
fill: colorSet.comboMainFill,
lineWidth: 1,
stroke: colorSet.comboMainStroke,
r: 5,
width: 20,
height: 10
},
size: [20, 5],
color: colorSet.comboMainStroke,
padding: [25, 20, 15, 20]
},
// combo 应用状态后的样式,默认仅提供 active、selected、highlight、inactive、disable用户可以自己扩展
comboStateStyles: {
active: {
stroke: colorSet.comboActiveStroke,
lineWidth: 1,
fill: colorSet.comboActiveFill
},
selected: {
stroke: colorSet.comboSelectedStroke,
lineWidth: 2,
fill: colorSet.comboSelectedFill,
shadowColor: colorSet.comboSelectedStroke,
shadowBlur: 10,
'text-shape': {
fontWeight: 500
}
},
highlight: {
stroke: colorSet.comboHighlightStroke,
lineWidth: 2,
fill: colorSet.comboHighlightFill,
'text-shape': {
fontWeight: 500
}
},
inactive: {
stroke: colorSet.comboInactiveStroke,
fill: colorSet.comboInactiveFill,
lineWidth: 1
},
disable: {
stroke: colorSet.comboDisableStroke,
fill: colorSet.comboDisableFill,
lineWidth: 1
}
},
delegateStyle: {
fill: '#F3F9FF',
fillOpacity: 0.5,
stroke: '#1890FF',
strokeOpacity: 0.9,
lineDash: [5, 5]
},
// 文本水印默认配置
textWaterMarkerConfig: {
width: 150,
height: 100,
compatible: false,
text: {
x: 0,
y: 60,
lineHeight: 20,
rotate: 20,
fontSize: 14,
fontFamily: 'Microsoft YaHei',
fill: 'rgba(0, 0, 0, 0.1)',
baseline: 'Middle'
}
},
imageWaterMarkerConfig: {
width: 150,
height: 130,
compatible: false,
image: {
x: 0,
y: 0,
width: 30,
height: 20,
rotate: 0
}
},
waterMarkerImage: 'https://gw.alipayobjects.com/os/s/prod/antv/assets/image/logo-with-text-73b8a.svg'
};