Fix bug: Title not shown in Graph view

This commit is contained in:
Tuan Cao 2022-04-17 21:01:13 +07:00
parent 6f027aeb8e
commit f606499ae8
2 changed files with 4 additions and 6 deletions

View File

@ -1,4 +1,4 @@
import React, {useEffect, useRef, useState} from 'react';
import React, {useState} from 'react';
// import cytoscape from 'cytoscape';
// import cola from 'cytoscape-cola';
@ -36,8 +36,8 @@ const styleSheet = [{
"background-color": "#666",
"font-size": "10px",
"width": "20px",
"height": "20px"
//"label": el => el.data("id") === current ? "" : el.data('title') ? el.data("title").slice(0,16) : el.data("id")
"height": "20px",
"label":"data(label)"
}
}, {
selector: "label",

View File

@ -126,8 +126,7 @@ export function getGraphData(currentNodeId) {
{
data: {
id: aNode.slug.toString(),
label: aNode.slug.toString(),
type: "ip"
label: Transformer.parseFileNameFromPath(toFilePath(aNode.slug)),
}
}
))
@ -136,7 +135,6 @@ export function getGraphData(currentNodeId) {
data: {
source: anEdge.source,
target: anEdge.target,
// label: anEdge.source + " => " + anEdge.target
}
}))