属性
diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts
index 91415ff..16db292 100644
--- a/src/app/ui/collection-tools/collection-tools.component.ts
+++ b/src/app/ui/collection-tools/collection-tools.component.ts
@@ -386,6 +386,18 @@ export class CollectionToolsComponent implements OnInit {
this.isShowProperty = false
})
}
+
+ copyAssetData:any //存储用于复制的素材
+ //复制素材
+ copyAsset(){
+
+ }
+ //粘贴素材
+ pasteAsset(){
+ // console.log(this.copyAssetData)
+ // console.log(this.canvasAssetObj)
+ }
+
basicInfo:boolean = true //基本信息名称显隐
wantToWork:boolean = true //想定作业名称显隐
//点击基本信息名称
From e654f5f3d0ec25cdf3c9c3f34f2f61edf5ea6466 Mon Sep 17 00:00:00 2001
From: SHAOJIAHAO <55341701@qq.com>
Date: Tue, 25 Aug 2020 10:04:47 +0800
Subject: [PATCH 2/8] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E5=B1=9E=E6=80=A7?=
=?UTF-8?q?=E6=A0=8F=E7=B4=A0=E6=9D=90=E5=B1=9E=E6=80=A7=E5=AE=BD=E9=AB=98?=
=?UTF-8?q?=E5=8F=98=E5=8C=96=E6=97=B6=E5=88=B7=E6=96=B0=E8=A7=86=E5=9B=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../collection-tools.component.ts | 24 +++++++++++++++----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts
index 0d445ca..3f6abec 100644
--- a/src/app/ui/collection-tools/collection-tools.component.ts
+++ b/src/app/ui/collection-tools/collection-tools.component.ts
@@ -162,17 +162,22 @@ export class CollectionToolsComponent implements OnInit {
//素材宽度输入框改变
assetWidthIunput(){
this.canvasAssetObj.Width = this.assetWidth
- // 需要将this.canvasAssetObj替换到serves服务对应对象中 ↓↓↓↓↓↓↓
+ this.canvasData.isChange = true
+ this.canvas.refresh()
}
//素材高度输入框改变
assetHeightIunput(){
this.canvasAssetObj.Height = this.assetHeight
+ this.canvasData.isChange = true
+ this.canvas.refresh()
}
//素材角度输入框改变
assetAngleIunput(){
this.canvasAssetObj.Angle = this.sliderValue
+ this.canvasData.isChange = true
+ this.canvas.refresh()
}
//素材是否高亮改变----->本地操作行为
@@ -186,6 +191,7 @@ export class CollectionToolsComponent implements OnInit {
return i.PropertyName == item.PropertyName
})
this.canvasAssetObj.PropertyInfos[index].PropertyValue = e.target.value
+ this.canvasData.isChange = true
}
//动态属性素材布尔值框改变radio
@@ -194,7 +200,7 @@ export class CollectionToolsComponent implements OnInit {
return i.PropertyName == item.PropertyName
})
this.canvasAssetObj.PropertyInfos[index].PropertyValue = boolean
-
+ this.canvasData.isChange = true
}
colorIndex//默认素材颜色
@@ -204,6 +210,8 @@ export class CollectionToolsComponent implements OnInit {
//在当前透明度基础上改变颜色
this.selectedcolor = item + this.selectedcolor.substring(this.selectedcolor.length-2)
this.canvasAssetObj.Color = this.selectedcolor
+ this.canvasData.isChange = true
+ this.canvas.refresh()
}
//颜色选择滑竿的值
@@ -217,6 +225,8 @@ export class CollectionToolsComponent implements OnInit {
}
this.selectedcolor = replacepos(this.selectedcolor,7,8,colorOpacity.toString(16))
this.canvasAssetObj.Color = this.selectedcolor
+ this.canvasData.isChange = true
+ this.canvas.refresh()
}
//查看图片详情
@@ -295,8 +305,8 @@ export class CollectionToolsComponent implements OnInit {
}else{
this.isImgNumCss = false
}
- //此处需要把 this.canvasAssetObj这个传入对象 返回给canvas 或者在源数据中替换掉↓↓↓↓↓↓↓↓↓↓
-
+
+ this.canvasData.isChange = true
})
} else if (file && fileSize>shardSize) { //上传文件>5MB时,分块上传
let config = new MatSnackBarConfig();
@@ -333,7 +343,8 @@ export class CollectionToolsComponent implements OnInit {
setTimeout(() => {
this.mySwiper.update();
}, 0);
- //此处需要把 this.canvasAssetObj这个传入对象 返回给canvas ↓↓↓↓↓↓↓↓↓↓
+
+ this.canvasData.isChange = true
}
}
@@ -343,6 +354,7 @@ export class CollectionToolsComponent implements OnInit {
return i.PropertyName == item.PropertyName
})
this.canvasAssetObj.PropertyInfos[index].PropertyValue = e.target.value
+ this.canvasData.isChange = true
}
//动态属性供给区域select选择框
@@ -351,6 +363,7 @@ export class CollectionToolsComponent implements OnInit {
return i.PropertyName == item.PropertyName
})
this.canvasAssetObj.PropertyInfos[index].PropertyValue = e.target.value
+ this.canvasData.isChange = true
}
//动态属性供给类型select选择框
@@ -359,6 +372,7 @@ export class CollectionToolsComponent implements OnInit {
return i.PropertyName == item.PropertyName
})
this.canvasAssetObj.PropertyInfos[index].PropertyValue = e.target.value
+ this.canvasData.isChange = true
}
ngOnInit(): void {
From ccd7047d46e359f4ecf4823a46d15d25f21a4bfe Mon Sep 17 00:00:00 2001
From: SHAOJIAHAO <55341701@qq.com>
Date: Tue, 25 Aug 2020 10:38:19 +0800
Subject: [PATCH 3/8] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E5=A4=8D=E5=88=B6=E7=B2=98=E8=B4=B4=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ui/collection-tools/collection-tools.component.ts | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts
index 3f6abec..d047b15 100644
--- a/src/app/ui/collection-tools/collection-tools.component.ts
+++ b/src/app/ui/collection-tools/collection-tools.component.ts
@@ -404,12 +404,15 @@ export class CollectionToolsComponent implements OnInit {
copyAssetData:any //存储用于复制的素材
//复制素材
copyAsset(){
-
+ this.canvas.copy()
}
//粘贴素材
pasteAsset(){
- // console.log(this.copyAssetData)
- // console.log(this.canvasAssetObj)
+ let companyId = sessionStorage.getItem("companyId")
+ let buildingId = this.beforeOneCheckedBuilding.id
+ let floorId = this.selectingSitePlan.id
+ this.canvas.paste(companyId,buildingId,floorId)
+ this.canvas.refresh()
}
basicInfo:boolean = true //基本信息名称显隐
From 5d1cfe09edda0ff73c0fc42ac6291a71e8efab1a Mon Sep 17 00:00:00 2001
From: SHAOJIAHAO <55341701@qq.com>
Date: Tue, 25 Aug 2020 11:21:42 +0800
Subject: [PATCH 4/8] =?UTF-8?q?[=E4=BF=AE=E6=AD=A3]=E7=B2=98=E8=B4=B4?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/ui/collection-tools/collection-tools.component.ts | 1 -
1 file changed, 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 d047b15..957774a 100644
--- a/src/app/ui/collection-tools/collection-tools.component.ts
+++ b/src/app/ui/collection-tools/collection-tools.component.ts
@@ -412,7 +412,6 @@ export class CollectionToolsComponent implements OnInit {
let buildingId = this.beforeOneCheckedBuilding.id
let floorId = this.selectingSitePlan.id
this.canvas.paste(companyId,buildingId,floorId)
- this.canvas.refresh()
}
basicInfo:boolean = true //基本信息名称显隐
From 3803494a9197235b3252baad45d94acdd6f35838 Mon Sep 17 00:00:00 2001
From: cpf <1105965053@qq.com>
Date: Tue, 25 Aug 2020 15:33:41 +0800
Subject: [PATCH 5/8] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E6=B6=88=E9=98=B2?=
=?UTF-8?q?=E8=A6=81=E7=B4=A0=E7=BB=9F=E8=AE=A1=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../collection-tools.component.ts | 71 +++++++++++++------
1 file changed, 49 insertions(+), 22 deletions(-)
diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts
index e41923b..91013f3 100644
--- a/src/app/ui/collection-tools/collection-tools.component.ts
+++ b/src/app/ui/collection-tools/collection-tools.component.ts
@@ -366,11 +366,6 @@ export class CollectionToolsComponent implements OnInit {
this.getAllLibrary()
this.getSitePlan()
this.getAllBuildings()
- setTimeout(() => {
- // console.log(1,this.canvasData.selectStorey)
- // console.log(2,this.canvasData.originalcompanyBuildingData)
- // console.log(3,this.canvasData.originaleveryStoreyData)
- }, 3000);
}
@@ -574,15 +569,13 @@ export class CollectionToolsComponent implements OnInit {
data.forEach(element => {
element.isTemplate = true //添加模板标识
element.isLook = true //添加是否可见标识
- element.children = []
- if(storeyData){
- for(let key in storeyData.data){
- if(element.id == storeyData.data[key].FireElementId){
- storeyData.data[key].isTemplate = false
- storeyData.data[key].isLook = true
- element.isNewElement = true
- element.children.push(storeyData.data[key])
- }
+ element.children? element.children : element.children = []
+ for(let key in storeyData.data){
+ if(element.id == storeyData.data[key].FireElementId){
+ storeyData.data[key].isTemplate = false
+ storeyData.data[key].isLook = true
+ element.isNewElement = true
+ element.children.push(storeyData.data[key])
}
}
data.forEach(item => { if (item.parentId == element.id) {element.children.push(item)} });
@@ -653,6 +646,12 @@ export class CollectionToolsComponent implements OnInit {
storeyData.data[key] = companyBuildingData.data[key]
}
}
+ for(let key in storeyData.data){ //筛选数据 没有匹配全部放入到 其他 数组
+ let noMatch = this.allFireElements.find( every=> every.id===storeyData.data[key].FireElementId )
+ if (!noMatch) {
+ this.allFireElements[this.allFireElements.length-1].children.push(storeyData.data[key])
+ }
+ }
this.handleTreeData(storeyData) //处理tree数据结构
}
@@ -726,6 +725,16 @@ export class CollectionToolsComponent implements OnInit {
let params = {ids:e}
let isTrue = this.http.get('/api/Companies/FireElements',{params}).subscribe((data:any)=>{
this.allFireElements = data //所有消防要素
+ let other = {
+ children: [],
+ computed: true,
+ id: '',
+ name: '其他',
+ order: 999,
+ parentId: null,
+ tag: "INPUT",
+ }
+ this.allFireElements.push(other)
return true
})
if (isTrue) { return 'success' }
@@ -782,14 +791,32 @@ export class CollectionToolsComponent implements OnInit {
//点击选中 平面图 楼层/区域 时
selectSitePlan (item,index) {
if (this.selectSitePlanIndex != index) {
- this.selectingSitePlan = item
- this.selectSitePlanIndex = index
- this.canvasData.selectStorey = item //服务中 存一份数据
- if (this.checkedBuildingIndex==-1) { //总平面图时
- this.getSitePlanStorey(item) //获取 平面图 楼层数据
- } else { //楼层/区域时
- this.getBuildingStorey(item) //获取 建筑 楼层数据
- }
+
+ if (this.canvasData.isChange) { //true 数据被改动
+ let isTrue = confirm('是否保存当前编辑数据')
+ if (isTrue) { //保存一遍数据, 再刷新数据
+
+ } else {
+ this.selectingSitePlan = item
+ this.selectSitePlanIndex = index
+ this.canvasData.selectStorey = item //服务中 存一份数据
+ if (this.checkedBuildingIndex==-1) { //总平面图时
+ this.getSitePlanStorey(item) //获取 平面图 楼层数据
+ } else { //楼层/区域时
+ this.getBuildingStorey(item) //获取 建筑 楼层数据
+ }
+ }
+ } else { //false 数据没被改动
+ this.selectingSitePlan = item
+ this.selectSitePlanIndex = index
+ this.canvasData.selectStorey = item //服务中 存一份数据
+ if (this.checkedBuildingIndex==-1) { //总平面图时
+ this.getSitePlanStorey(item) //获取 平面图 楼层数据
+ } else { //楼层/区域时
+ this.getBuildingStorey(item) //获取 建筑 楼层数据
+ }
+ } //if
+
}
}
From c9902dbcb40784548707392dba8f82e98fc31601 Mon Sep 17 00:00:00 2001
From: SHAOJIAHAO <55341701@qq.com>
Date: Tue, 25 Aug 2020 15:34:45 +0800
Subject: [PATCH 6/8] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E6=9F=A5=E7=9C=8B?=
=?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=8B=E7=9A=84=E6=B6=88=E9=98=B2=E8=A6=81?=
=?UTF-8?q?=E7=B4=A0=E6=A0=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../collection-tools.component.html | 9 +++----
.../collection-tools.component.scss | 3 +++
.../collection-tools.component.ts | 24 +++++++++++++++----
3 files changed, 28 insertions(+), 8 deletions(-)
diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html
index 6f13cf4..5299be6 100644
--- a/src/app/ui/collection-tools/collection-tools.component.html
+++ b/src/app/ui/collection-tools/collection-tools.component.html
@@ -302,15 +302,16 @@
-
+
+
- {{node.name}}
+ {{node.name}}
({{node.children.length}})
visibility
-
+
- {{node.name}}
+ {{node.name}}
({{node.children.length}})
visibility
diff --git a/src/app/ui/collection-tools/collection-tools.component.scss b/src/app/ui/collection-tools/collection-tools.component.scss
index fef6cd0..2d00da5 100644
--- a/src/app/ui/collection-tools/collection-tools.component.scss
+++ b/src/app/ui/collection-tools/collection-tools.component.scss
@@ -298,4 +298,7 @@ div:focus {
}
.mat-tree-node:hover{
background-color: #ccebf8;
+}
+.isLookPattern{
+ display: none;
}
\ No newline at end of file
diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts
index 957774a..ba330fd 100644
--- a/src/app/ui/collection-tools/collection-tools.component.ts
+++ b/src/app/ui/collection-tools/collection-tools.component.ts
@@ -30,6 +30,7 @@ export class CollectionToolsComponent implements OnInit {
isTemplate:node.isTemplate,
isNewElement:node.isNewElement,
isLook:node.isLook,
+ isLookPattern:node.isLookPattern || null,
node:node
};
}
@@ -243,7 +244,6 @@ export class CollectionToolsComponent implements OnInit {
let imgFile = e.target.files[0] || null //上传的文件
this.startUploading(imgFile)
}
-
objectName:any //上传对象名
startUploading (imgFile) {
let _this = this
@@ -456,7 +456,6 @@ export class CollectionToolsComponent implements OnInit {
CompanyData.data = JSON.stringify(CompanyData.data)
if(this.checkedBuildingIndex==-1){
- console.log(SitePlanData)
this.http.post("/api/CompanyAccount/SitePlanData",SitePlanData).subscribe(data => {
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
@@ -597,18 +596,33 @@ export class CollectionToolsComponent implements OnInit {
handleTreeData (storeyData) {
this.storeyData = storeyData
- let data = this.allFireElements //所有消防要素
+ let data = this.allFireElements //所有消防要素模板
let treeData = [] //tree型 处理完成后的数据
data.forEach(element => {
element.isTemplate = true //添加模板标识
element.isLook = true //添加是否可见标识
+ // element.isLookPattern = false
+
element.children = []
if(storeyData){
for(let key in storeyData.data){
if(element.id == storeyData.data[key].FireElementId){
storeyData.data[key].isTemplate = false
storeyData.data[key].isLook = true
- element.isNewElement = true
+ storeyData.data[key].isLookPattern = true
+ element.isNewElement = true //该节点children是否存在新添加的真实素材 标识
+
+ //定义查看模式下能看到的元素
+ element.isLookPattern = true
+ if(element.parentId){
+ data.forEach(i => {
+ if(i.id == element.parentId){
+ i.isLookPattern = true
+ }
+ })
+ }
+ //
+
element.children.push(storeyData.data[key])
}
}
@@ -624,9 +638,11 @@ export class CollectionToolsComponent implements OnInit {
//点击树节点
clickTreeNode(node){
+ // console.log(node)
if(node.node.Point){
this.setAssetsProperty(node.node)
}
+
}
//点击数节点的显示隐藏icon
From 2e26b407a977706d496aa193e8a368d9b3bfd9dd Mon Sep 17 00:00:00 2001
From: SHAOJIAHAO <55341701@qq.com>
Date: Tue, 25 Aug 2020 16:05:42 +0800
Subject: [PATCH 7/8] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E7=82=B9=E5=87=BB?=
=?UTF-8?q?=E6=A0=91=E8=8A=82=E7=82=B9=E6=97=B6=E6=9B=B4=E6=96=B0=E4=BC=A0?=
=?UTF-8?q?=E5=85=A5=E5=B1=9E=E6=80=A7=E5=AF=B9=E8=B1=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../collection-tools.component.ts | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts
index b8f9102..d9487b2 100644
--- a/src/app/ui/collection-tools/collection-tools.component.ts
+++ b/src/app/ui/collection-tools/collection-tools.component.ts
@@ -30,8 +30,7 @@ export class CollectionToolsComponent implements OnInit {
isTemplate:node.isTemplate,
isNewElement:node.isNewElement,
isLook:node.isLook,
- isLookPattern:node.isLookPattern || null,
- node:node
+ isLookPattern:node.isLookPattern || null
};
}
treeControl = new FlatTreeControl(node => node.level, node => node.expandable);
@@ -388,7 +387,6 @@ export class CollectionToolsComponent implements OnInit {
this.canvas.on("select",obj=>{
//选中素材属性注入函数
this.setAssetsProperty(obj.assetData)
- console.log(obj.assetData)
})
// 监听canvas组件取消选中素材事件
this.canvas.on("deselect",obj=>{
@@ -596,15 +594,15 @@ export class CollectionToolsComponent implements OnInit {
data.forEach(element => {
element.isTemplate = true //添加模板标识
element.isLook = true //添加是否可见标识
- // element.isLookPattern = false
element.children? element.children : element.children = []
if(storeyData){
for(let key in storeyData.data){
+ storeyData.data[key].isLookPattern = true
if(element.id == storeyData.data[key].FireElementId){
storeyData.data[key].isTemplate = false
storeyData.data[key].isLook = true
- storeyData.data[key].isLookPattern = true
+
element.isNewElement = true //该节点children是否存在新添加的真实素材 标识
//定义查看模式下能看到的元素
@@ -628,16 +626,17 @@ export class CollectionToolsComponent implements OnInit {
if (!element.parentId) { treeData.push(element) }
});
this.dataSource.data = treeData
+ console.log(this.dataSource.data)
this.treeControl.expandAll()
}
//点击树节点
clickTreeNode(node){
- // console.log(node)
- if(node.node.Point){
- this.setAssetsProperty(node.node)
+ if(this.canvasData.originalcompanyBuildingData.data[node.id]){
+ this.setAssetsProperty(this.canvasData.originalcompanyBuildingData.data[node.id])
+ }else if(this.canvasData.originaleveryStoreyData.data[node.id]){
+ this.setAssetsProperty(this.canvasData.originaleveryStoreyData.data[node.id])
}
-
}
//点击数节点的显示隐藏icon
@@ -779,6 +778,7 @@ export class CollectionToolsComponent implements OnInit {
order: 999,
parentId: null,
tag: "INPUT",
+ isLookPattern : true
}
this.allFireElements.push(other)
return true
From c7e14ae5ba980195869681861ea66190298e08f1 Mon Sep 17 00:00:00 2001
From: cpf <1105965053@qq.com>
Date: Tue, 25 Aug 2020 16:29:05 +0800
Subject: [PATCH 8/8] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E6=B6=88=E9=98=B2?=
=?UTF-8?q?=E7=B4=A0=E6=9D=90=E5=AE=8C=E5=96=84,=20=E7=89=88=E6=9C=AC?=
=?UTF-8?q?=E5=8F=B7=E6=8A=A5=E9=94=99=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/ui/collection-tools/collection-tools.component.ts | 6 +++---
src/app/working-area/working-area.component.ts | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts
index b8f9102..1a52a69 100644
--- a/src/app/ui/collection-tools/collection-tools.component.ts
+++ b/src/app/ui/collection-tools/collection-tools.component.ts
@@ -596,9 +596,8 @@ export class CollectionToolsComponent implements OnInit {
data.forEach(element => {
element.isTemplate = true //添加模板标识
element.isLook = true //添加是否可见标识
- // element.isLookPattern = false
+ element.name!='其他'? element.children = [] : element.children
- element.children? element.children : element.children = []
if(storeyData){
for(let key in storeyData.data){
if(element.id == storeyData.data[key].FireElementId){
@@ -681,7 +680,8 @@ export class CollectionToolsComponent implements OnInit {
this.canvas.refresh()
this.canvasData.isChange = false //服务中 数据是否改动 改为false
this.isShowProperty = true
- this.isShowAttribute = true //属性栏展示 默认数据
+ this.isShowAttribute = true
+ this.allFireElements[this.allFireElements.length-1].children = []
let beforeOneId = this.selectingSitePlan.id || '' //当前 选中 平面图 楼层/区域 id
let companyBuildingData = JSON.parse(JSON.stringify( this.canvasData.originalcompanyBuildingData || {} )) // 当前 单位/建筑 数据
diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts
index 77adb12..ceaf3cd 100644
--- a/src/app/working-area/working-area.component.ts
+++ b/src/app/working-area/working-area.component.ts
@@ -262,7 +262,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
public versionChecking(): void {
const floorData = this.canvasData.originaleveryStoreyData;
const buildingData = this.canvasData.originalcompanyBuildingData;
- if (floorData.version === '1.0') {
+ if (floorData.version && floorData.version === '1.0') {
floorData.version = '2.0';
Object.keys(floorData.data).forEach(item => {
floorData.data[item].Point.y *= -1;
@@ -271,7 +271,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
});
});
}
- if (buildingData.version === '1.0') {
+ if (buildingData.version && buildingData.version === '1.0') {
buildingData.version = '2.0';
Object.keys(buildingData.data).forEach(item => {
buildingData.data[item].Point.y *= -1;