Fix bug: Title not shown in Graph view
This commit is contained in:
parent
6f027aeb8e
commit
f606499ae8
@ -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",
|
||||
|
@ -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
|
||||
}
|
||||
}))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user