Fix linting and upate webui assets
This commit is contained in:
@@ -14,7 +14,7 @@ const FocusOnNode = ({ node, move }: { node: string | null; move?: boolean }) =>
|
||||
*/
|
||||
useEffect(() => {
|
||||
const graph = sigma.getGraph();
|
||||
|
||||
|
||||
if (move) {
|
||||
if (node && graph.hasNode(node)) {
|
||||
try {
|
||||
|
@@ -62,13 +62,13 @@ const GraphControl = ({ disableHoverEffect }: { disableHoverEffect?: boolean })
|
||||
} catch (error) {
|
||||
console.error('Error setting graph on sigma instance:', error);
|
||||
}
|
||||
|
||||
|
||||
// 应用布局
|
||||
assignLayout();
|
||||
console.log('Layout applied to graph');
|
||||
}
|
||||
}, [sigma, sigmaGraph, assignLayout, maxIterations])
|
||||
|
||||
|
||||
/**
|
||||
* Ensure the sigma instance is set in the store
|
||||
* This provides a backup in case the instance wasn't set in GraphViewer
|
||||
@@ -224,7 +224,7 @@ const GraphControl = ({ disableHoverEffect }: { disableHoverEffect?: boolean })
|
||||
} else {
|
||||
const _selectedEdge = selectedEdge && graph.hasEdge(selectedEdge) ? selectedEdge : null;
|
||||
const _focusedEdge = focusedEdge && graph.hasEdge(focusedEdge) ? focusedEdge : null;
|
||||
|
||||
|
||||
if (_selectedEdge || _focusedEdge) {
|
||||
if (edge === _selectedEdge) {
|
||||
newData.color = Constants.edgeColorSelected
|
||||
|
@@ -101,7 +101,7 @@ const refineNodeProperties = (node: RawNodeType): NodeType => {
|
||||
|
||||
// 获取所有边
|
||||
const edges = state.sigmaGraph.edges(node.id)
|
||||
|
||||
|
||||
// 处理每条边
|
||||
for (const edgeId of edges) {
|
||||
// 检查边是否还存在
|
||||
|
Reference in New Issue
Block a user