From f403a1b853a345a790caa682f19bea75b502ba27 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Tue, 30 Nov 2021 17:02:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E6=AD=A5=E6=9B=B4=E6=96=B0=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/pages/plan/plan.component.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts index a1995d6..9c1804e 100644 --- a/src/app/pages/plan/plan.component.ts +++ b/src/app/pages/plan/plan.component.ts @@ -104,7 +104,6 @@ export class PlanComponent implements OnInit { else //非内部制作模式,不开启 { console.log("没有单位" + simpleData.key); - } } } else { @@ -121,6 +120,12 @@ export class PlanComponent implements OnInit { }) } + ngAfterViewChecked () { + if (this.isShowNature && this.beforeOnePropertyData && (this.selectFence === 1 || this.selectFence === 2)) { //刷新弹窗 位置 + this.renovateDialogPosition() + } + } + ngOnDestroy(): void { //组件销毁前 销毁canvas this.game.dispose(); this.game = null; @@ -395,8 +400,10 @@ export class PlanComponent implements OnInit { //刷新设备属性 弹窗位置 renovateDialogPosition() { - this.naturePosition.left = `${this.beforeOnePropertyData.getHeadUIPos().x - 150}px` - this.naturePosition.top = `${this.beforeOnePropertyData.getHeadUIPos().y + 100}px` + window.setTimeout(()=>{ + this.naturePosition.left = `${this.beforeOnePropertyData.getHeadUIPos().x - 150}px` + this.naturePosition.top = `${this.beforeOnePropertyData.getHeadUIPos().y + 100}px` + },0) } //上传设备 图片