From 8cbc2cdc3b183b08f818b7f500c80c44b3b2ecd4 Mon Sep 17 00:00:00 2001 From: zhenggengtong <1312771309@qq.com> Date: Sun, 23 Oct 2022 23:29:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E5=A4=96=E9=83=A8=E6=8C=87=E9=92=88?= =?UTF-8?q?=E8=A6=86=E7=9B=96=E7=BB=93=E7=82=B9=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/View/renderer.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/View/renderer.ts b/src/View/renderer.ts index 6cc9b01..ed129e1 100644 --- a/src/View/renderer.ts +++ b/src/View/renderer.ts @@ -1,5 +1,6 @@ import { Engine } from '../engine'; import { SVModel } from '../Model/SVModel'; +import { SVMarker } from '../Model/SVNodeAppendage' import { Util } from '../Common/util'; import { Tooltip, Graph, GraphData, Modes } from '@antv/g6'; import { InitG6Behaviors } from '../BehaviorHelper/initG6Behaviors'; @@ -150,7 +151,14 @@ export class Renderer { item.G6Item['SVModel'] = item; }); + //外部指针在结点图层上方 + this.g6Instance.getNodes().forEach(item => { + if (item['SVModel'] instanceof SVMarker) { + item.toFront() + } + }) this.g6Instance.getEdges().forEach(item => item.toFront()); + this.g6Instance.paint(); }