|
|
|
@ -894,13 +894,26 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
this.canvas.setIconVisible(iconVisibleArr,!node.isLook) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//计算 可视区域内宽度, 是否缩放背景图
|
|
|
|
|
backGroundScale () { |
|
|
|
|
let that = this |
|
|
|
|
let dad = document.querySelector('.functionalDomainContent').clientWidth |
|
|
|
|
let imgWidth = dad - 460 //可是区域内 宽度
|
|
|
|
|
let img = new Image() |
|
|
|
|
img.src = this.selectingSitePlan.imageUrl;
|
|
|
|
|
img.onload = function(){ |
|
|
|
|
img.width > imgWidth? that.canvas.setBackgroundScale(imgWidth/img.width) : null |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//封装 刷新 tree 数据
|
|
|
|
|
renovateTreeData (isRefresh:boolean = true) { |
|
|
|
|
this.allFireElements[this.allFireElements.length-1].children = [] |
|
|
|
|
isRefresh? this.canvas.refresh() : null |
|
|
|
|
isRefresh? this.canvasData.isChange = false : null //服务中 数据是否改动 改为false
|
|
|
|
|
isRefresh? this.isShowProperty = true : null |
|
|
|
|
isRefresh? this.isShowAttribute = true : null |
|
|
|
|
this.allFireElements[this.allFireElements.length-1].children = [] |
|
|
|
|
this.selectingSitePlan.imageUrl? this.backGroundScale() : null |
|
|
|
|
|
|
|
|
|
let beforeOneId = this.selectingSitePlan.id || '' //当前 选中 平面图 楼层/区域 id
|
|
|
|
|
let companyBuildingData = JSON.parse(JSON.stringify( this.canvasData.originalcompanyBuildingData || {} )) // 当前 单位/建筑 数据
|
|
|
|
@ -1320,6 +1333,7 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
let isSuccess = this.renovateSitePlan() |
|
|
|
|
isSuccess.then(res=>{ |
|
|
|
|
this.canvas.refreshBackgroundImage() |
|
|
|
|
this.backGroundScale() |
|
|
|
|
}) |
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
@ -1331,6 +1345,7 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
let isSuccess = this.renovateBuilding() |
|
|
|
|
isSuccess.then(res=>{ |
|
|
|
|
this.canvas.refreshBackgroundImage() |
|
|
|
|
this.backGroundScale() |
|
|
|
|
}) |
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|