From 667c08a39b523e7afdf00a6af17ac2d4274b659a Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期五, 13 十二月 2024 09:37:33 +0800
Subject: [PATCH] 代理名称

---
 src/components/graph/treeGraph/TreeGraph.vue |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/components/graph/treeGraph/TreeGraph.vue b/src/components/graph/treeGraph/TreeGraph.vue
index 0e6e7db..4cf319d 100644
--- a/src/components/graph/treeGraph/TreeGraph.vue
+++ b/src/components/graph/treeGraph/TreeGraph.vue
@@ -1,5 +1,5 @@
 <template>
-	<div  class="h-full w-full bg-white relative flex flex-col">
+	<div class="h-full w-full bg-white relative flex flex-col">
 		<!-- <div class="toolbar flex-0 border-x-0 border-b border-t-0 border-gray-200 border-solid flex-items-center">
 			<span>
 				鏍煎紡
@@ -147,11 +147,12 @@
 		selfAdapt();
 	}
 };
-const rebuildGraph = async(extraOption: DeepPartial<GraphOptions>) => {
+const rebuildGraph = async (extraOption: DeepPartial<GraphOptions>) => {
 	const finalOptions = defaultsDeep(extraOption, commonOption);
 	graph.setOptions(finalOptions);
-	await graphRender();
-	graph.fitCenter();
+	await graph.render();
+	// graph.fitCenter();
+	selfAdapt();
 };
 
 let commonOption: GraphOptions;
@@ -207,8 +208,15 @@
 		behaviors: [
 			'drag-canvas',
 			'zoom-canvas',
+
 			// 'drag-element',
 			{
+				key: 'collapse-expand',
+				type: 'collapse-expand',
+				trigger: 'click',
+			},
+
+			{
 				key: 'hover-activate',
 				type: 'hover-activate',
 				degree: 5,

--
Gitblit v1.9.3