feat: 拓扑信息简览
This commit is contained in:
@@ -317,7 +317,7 @@ registerNode(
|
||||
if (cfg.info) {
|
||||
const neInfo: any = cfg.info;
|
||||
const hasNeState = neInfo.serverState.neId;
|
||||
group.addShape('circle', {
|
||||
const neStateShape = group.addShape('circle', {
|
||||
attrs: {
|
||||
x: r - 3,
|
||||
y: -r + 3,
|
||||
@@ -329,6 +329,21 @@ registerNode(
|
||||
// must be assigned in G6 3.3 and later versions. it can be any string you want, but should be unique in a custom item type
|
||||
name: 'ne-state',
|
||||
});
|
||||
|
||||
// 添加动画
|
||||
neStateShape.animate(
|
||||
{
|
||||
// Magnifying and disappearing
|
||||
r: 5,
|
||||
opacity: 0.3,
|
||||
},
|
||||
{
|
||||
duration: 1000,
|
||||
easing: 'easeCubic',
|
||||
delay: 0,
|
||||
repeat: true, // repeat
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (cfg.label) {
|
||||
@@ -1468,9 +1483,6 @@ export function randerGroph(graphG6Dom: HTMLElement | undefined, data: any) {
|
||||
<div id="hide" style="cursor: pointer; margin-bottom: 2px">
|
||||
2. 隐藏节点
|
||||
</div>
|
||||
<div id="restart" style="cursor: pointer; margin-bottom: 2px">
|
||||
3. 重启
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user