137c2960 by lihua

fix: 解决关系网问题

1 parent f3da88e9
......@@ -247,6 +247,11 @@ const initGraph = () => {
}
const data = item.getModel();
data.collapsed = collapsed;
setTimeout(() => {
graph.focusItem(item, true, {
duration: 400 // 动画时长为500ms
});
}, 500)
return true;
},
shouldBegin: (e) => {
......@@ -472,7 +477,9 @@ const bindEvents = () => {
}
});
lastSelectNode.value = item;
detailInfo.value.guid = model.guid;
detailInfo.value = {};
// detailInfo.value.guid = model.guid;
detailInfoLabel.value = model.label || {};
updateTooltipPosition(evt);
detailLoading.value = true;
......
......@@ -7,8 +7,8 @@
<div className='g6-component-topbar'>
<graphTopbar ref="topBarRef" @displaySwitchChange="displaySwitchChange" :isGraphDisplay="isGraphDisplay" />
</div>
<RelationNetwork v-show="graphTreeData?.guid && isGraphDisplay" ref="relationNetworkRef" :tree-data="graphTreeData" :noContextMenu="true"
@nodeItemClick="handleNodeItemClick">
<RelationNetwork v-show="graphTreeData?.guid && isGraphDisplay" ref="relationNetworkRef" :tree-data="graphTreeData"
:noContextMenu="true" @nodeItemClick="handleNodeItemClick">
</RelationNetwork>
<Sankey v-show="!isGraphDisplay && (sankeyNames?.length || sankeyDataLoading)" v-loading="sankeyDataLoading"
:tree-data="sankeyData" :names="sankeyNames">
......@@ -128,6 +128,9 @@ const handleNodeItemClick = (graph, nodeItem) => {
graph.layout();
graph.setMinZoom(0.5);
graph.setMaxZoom(5);
graph.focusItem(nodeItem, true, {
duration: 400 // 动画时长为500ms
});
}, 500);
} else {
parentData.isLoading = false;
......
......@@ -204,6 +204,9 @@ const handleNodeItemClick = (graph, nodeItem) => {
graph.layout();
graph.setMinZoom(0.5);
graph.setMaxZoom(5);
graph.focusItem(nodeItem, true, {
duration: 500 // 动画时长为500ms
});
}, 500);
} else {
parentData.isLoading = false;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!