From 60de5a58a2b9e2f9d53090f9d424344c54f8a2f8 Mon Sep 17 00:00:00 2001
From: cpf <1105965053@qq.com>
Date: Mon, 8 Feb 2021 12:21:36 +0800
Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E5=AE=8C=E5=96=84?=
=?UTF-8?q?=E5=8F=96=E6=B6=88=E6=8C=89=E9=92=AE=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../collection-tools.component.ts | 2 ++
src/app/ui/collection-tools/editPlaneFigure.html | 2 +-
.../ui/collection-tools/leftFunctionalDomain.ts | 16 ++++++++++++++++
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts
index 52ec061..7e8064b 100644
--- a/src/app/ui/collection-tools/collection-tools.component.ts
+++ b/src/app/ui/collection-tools/collection-tools.component.ts
@@ -1451,6 +1451,8 @@ export class CollectionToolsComponent implements OnInit {
isSuccess.then(res=>{
this.canvas.refreshBackgroundImage()
})
+ }else if (data == '更新背景图') {
+ this.canvas.refreshBackgroundImage()
}
})
}
diff --git a/src/app/ui/collection-tools/editPlaneFigure.html b/src/app/ui/collection-tools/editPlaneFigure.html
index bab09da..d21cbf3 100644
--- a/src/app/ui/collection-tools/editPlaneFigure.html
+++ b/src/app/ui/collection-tools/editPlaneFigure.html
@@ -42,7 +42,7 @@
-
+
diff --git a/src/app/ui/collection-tools/leftFunctionalDomain.ts b/src/app/ui/collection-tools/leftFunctionalDomain.ts
index 92be8fb..079f199 100644
--- a/src/app/ui/collection-tools/leftFunctionalDomain.ts
+++ b/src/app/ui/collection-tools/leftFunctionalDomain.ts
@@ -73,6 +73,8 @@ export class editPlaneFigureComponent implements OnInit {
this.details = this.data.buildingData.details || ''
this.imgWidth = this.data.buildingData.imageWidth || 0
this.imgHeight = this.data.buildingData.imageHeight || 0
+ this.oldWidth = JSON.parse(JSON.stringify(this.data.buildingData.imageWidth || 0))
+ this.oldHeight = JSON.parse(JSON.stringify(this.data.buildingData.imageHeight || 0))
if (this.imgWidth==0 && this.imgHeight==0 && this.data.buildingData.imageUrl) {
let that = this
let img = new Image()
@@ -93,6 +95,9 @@ export class editPlaneFigureComponent implements OnInit {
});
}
+ oldWidth:number; //原图片宽
+ oldHeight:number; //原图片高
+
name:any; //name
checked:boolean = false;//是否为避难层
area:number; //面积
@@ -126,6 +131,17 @@ export class editPlaneFigureComponent implements OnInit {
e.checked? this.imgScale = Number((this.imgWidth/this.imgHeight)) : null
}
+ //关闭
+ close () {
+ if (this.oldWidth === this.imgWidth && this.oldHeight === this.imgHeight) {
+ this.dialogRef.close()
+ } else {
+ this.canvasData.selectStorey.imageWidth = this.oldWidth
+ this.canvasData.selectStorey.imageHeight = this.oldHeight
+ this.dialogRef.close('更新背景图');
+ }
+ }
+
//提交表单修改平面图
onSubmit (e) {
if (!this.data.isBuilding) { //总平面图 修改平面图