Browse Source

异步更新位置

dev
陈鹏飞 3 years ago
parent
commit
f403a1b853
  1. 13
      src/app/pages/plan/plan.component.ts

13
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)
}
//上传设备 图片

Loading…
Cancel
Save