From e3d757173e6ef4f2efaead312f62498216d751aa Mon Sep 17 00:00:00 2001 From: cjc <431909623@qq.com> Date: Mon, 13 Jun 2022 17:08:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8A=E4=B8=80=E6=AD=A5?= =?UTF-8?q?=E4=B8=8B=E4=B8=80=E6=AD=A5=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/View/viewContainer.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/View/viewContainer.ts b/src/View/viewContainer.ts index 540b30e..3771443 100644 --- a/src/View/viewContainer.ts +++ b/src/View/viewContainer.ts @@ -28,6 +28,10 @@ export class ViewContainer { private prevModelList: SVModel[]; private accumulateLeakModels: SVModel[]; + private preIsFirstDebug: boolean[]; //存储以前的handleUpdate + private stackAddress: number //指向preHandleUpdate的栈地址 + private preCount: number; //点击上一步的次数 + public hasLeak: boolean; public leakAreaY: number; public lastLeakAreaTranslateY: number; @@ -48,6 +52,9 @@ export class ViewContainer { this.brushSelectedModels = []; this.clickSelectNode = null; this.lastLeakAreaTranslateY = 0; + this.preIsFirstDebug = []; + this.preCount = 0; + this.stackAddress = 0; const g6Instance = this.renderer.getG6Instance(), leakAreaHeight = this.engine.viewOptions.leakAreaHeight, @@ -191,10 +198,21 @@ export class ViewContainer { this.setPrevUpdateId([]) return; } - // 判断是否需要进行泄漏区的比较 let isDiffLeak = handleUpdate?.isEnterFunction || handleUpdate?.hasTriggerLastStep; + + if (!handleUpdate?.hasTriggerLastStep) { + this.preCount++; + } else { + this.preCount--; + } + //preCount用来判断是否是第一次进入调试,因为刚开始调试后点击下一步再点上一步,后端给回的isFirstDebug = false,因改为true + if (this.preCount === 1 || this.preCount === 2) { + console.log(this.preCount); + + handleUpdate.isFirstDebug = true; + } const diffResult = this.reconcile.diff( this.layoutGroupTable, this.prevModelList,