From cd13de903584fb0f214376383762b1f431e966ab Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Tue, 8 Sep 2020 11:09:43 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E5=9B=BE=E5=A4=A7=E5=B0=8F=20=E7=BC=A9?= =?UTF-8?q?=E6=94=BE=20=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collection-tools/collection-tools.component.scss | 2 +- .../collection-tools/collection-tools.component.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/ui/collection-tools/collection-tools.component.scss b/src/app/ui/collection-tools/collection-tools.component.scss index 04144b9..7c8c861 100644 --- a/src/app/ui/collection-tools/collection-tools.component.scss +++ b/src/app/ui/collection-tools/collection-tools.component.scss @@ -98,7 +98,7 @@ } .functionalDomainRight { border: 1px solid #464646; - width: 12%; + width: 230px; right: 0; } //左侧导航栏显示隐藏 diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index 7fbc2de..2adc441 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -898,24 +898,22 @@ export class CollectionToolsComponent implements OnInit { backGroundScale () { let that = this let dad = document.querySelector('.functionalDomainContent').clientWidth - let leftSon = document.querySelector('.functionalDomainLeft').clientWidth - let rightSon = document.querySelector('.functionalDomainRight').clientWidth - let imgWidth = dad - leftSon - rightSon //可是区域内 宽度 + let imgWidth = dad - 460 //可是区域内 宽度 let img = new Image() img.src = this.selectingSitePlan.imageUrl; img.onload = function(){ - // img.width > imgWidth? that.canvas.setBackgroundScale(img.width/imgWidth) : null + 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.backGroundScale() + this.selectingSitePlan.imageUrl? this.backGroundScale() : null let beforeOneId = this.selectingSitePlan.id || '' //当前 选中 平面图 楼层/区域 id let companyBuildingData = JSON.parse(JSON.stringify( this.canvasData.originalcompanyBuildingData || {} )) // 当前 单位/建筑 数据 @@ -1335,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'; @@ -1346,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';