From ea7bcdf8aa7b31036c6bf1a032cf843a23c73d1a Mon Sep 17 00:00:00 2001 From: hanyuxia Date: Tue, 25 Jun 2024 14:28:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=9E=E4=BD=93=E5=85=B3=E7=B3=BB?= =?UTF-8?q?=E5=9B=BE=E4=BC=98=E5=8C=96=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= =?UTF-8?q?:1.=E9=87=8D=E7=BD=AE=E6=93=8D=E4=BD=9C=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E9=AB=98=E4=BA=AE=E8=8A=82=E7=82=B9=E9=87=8D?= =?UTF-8?q?=E7=BD=AE=E4=B8=BArootNode=EF=BC=8CrightBox=E4=B9=9F=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E4=B8=BArootNode=EF=BC=9B2.=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=9A=E8=BF=9B=E8=BF=87=E5=A4=9A=E6=AC=A1?= =?UTF-8?q?=E4=B8=8A=E4=B8=80=E6=AD=A5=E4=B8=8B=E4=B8=80=E6=AD=A5=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=EF=BC=8C=E7=82=B9=E5=87=BB=E4=B8=AD=E5=BF=83=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E6=97=B6=EF=BC=8C=E6=8C=87=E5=90=91=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E7=9A=84=E7=BA=BF=E6=9C=AA=E5=8A=A0=E7=B2=97?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/entityExplorer/EntityGraph.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/entityExplorer/EntityGraph.vue b/src/views/entityExplorer/EntityGraph.vue index 7607c41d..c361dad5 100644 --- a/src/views/entityExplorer/EntityGraph.vue +++ b/src/views/entityExplorer/EntityGraph.vue @@ -101,7 +101,7 @@ export default { switch (node.type) { case nodeType.rootNode: { // 如果是鼠标点击高亮的,最外层加上第三层圆环 - if (node === this.clickNode) { + if (node.id === this.clickNode.id) { ctx.beginPath() ctx.arc(node.x, node.y, nodeStyle.selectedShadowR, 0, 2 * Math.PI, false) ctx.closePath() @@ -251,7 +251,7 @@ export default { color = 'rgba(119,131,145,0.2)' // 虚线颜色 } else { ctx.setLineDash([]) - if (this.clickNode === link.source || this.clickNode === link.target) { + if (this.clickNode.id === link.source.id || this.clickNode.id === link.target.id) { color = 'rgba(119,131,145,0.8)' // 高亮线颜色 } else { color = 'rgba(119,131,145,0.3)' // 普通线颜色 @@ -708,6 +708,9 @@ export default { justRedo: false } this.graph.graphData(_.cloneDeep(this.initialData)).centerAt(0, 0).zoom(0.9999) + this.rightBox.show = true + this.rightBox.node = this.rootNode + this.rightBox.mode = 'detail' } },