diff --git a/src/app/navigation/navigation.component.html b/src/app/navigation/navigation.component.html index 985c8e0..8beb98d 100644 --- a/src/app/navigation/navigation.component.html +++ b/src/app/navigation/navigation.component.html @@ -9,8 +9,8 @@
  • 基本信息
  • -
  • 平面图
  • -
  • H5平面图
  • + +
  • 平面图
  • 四周毗邻
  • diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index f8f7534..3f65863 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -1004,28 +1004,28 @@ export class CollectionToolsComponent implements OnInit { //计算 可视区域内宽度, 是否缩放背景图 backGroundScale () { - let that = this - let dad = document.querySelector('.functionalDomainContent').clientWidth - let dadHeight = document.querySelector('.functionalDomainContent').clientHeight - let left = document.querySelector('.functionalDomainLeft').clientWidth - let right = document.querySelector('.functionalDomainRight').clientWidth - let imgWidth = dad - left - right//可视区域内 宽度 - let img = new Image() - img.src = this.selectingSitePlan.imageUrl; - img.onload = function(){ - if (img.height > dadHeight && img.width > imgWidth) { - let width = imgWidth/img.width - let height = dadHeight/img.height - // that.canvas.setBackgroundScale((width>height? height : width)-0.005) - return - } else if (img.height > dadHeight) { - // that.canvas.setBackgroundScale((dadHeight/img.height)-0.005) - return - } else if (img.width > imgWidth) { - // that.canvas.setBackgroundScale((imgWidth/img.width)-0.005) - return - } - }; + // let that = this + // let dad = document.querySelector('.functionalDomainContent').clientWidth + // let dadHeight = document.querySelector('.functionalDomainContent').clientHeight + // let left = document.querySelector('.functionalDomainLeft').clientWidth + // let right = document.querySelector('.functionalDomainRight').clientWidth + // let imgWidth = dad - left - right//可视区域内 宽度 + // let img = new Image() + // img.src = this.selectingSitePlan.imageUrl; + // img.onload = function(){ + // if (img.height > dadHeight && img.width > imgWidth) { + // let width = imgWidth/img.width + // let height = dadHeight/img.height + // that.canvas.setBackgroundScale((width>height? height : width)-0.005) + // return + // } else if (img.height > dadHeight) { + // that.canvas.setBackgroundScale((dadHeight/img.height)-0.005) + // return + // } else if (img.width > imgWidth) { + // that.canvas.setBackgroundScale((imgWidth/img.width)-0.005) + // return + // } + // }; } //封装 刷新 tree 数据 @@ -1035,7 +1035,6 @@ export class CollectionToolsComponent implements OnInit { isRefresh? this.canvasData.isChange = false : null //服务中 数据是否改动 改为false isRefresh? this.isShowProperty = true : null isRefresh? this.isShowAttribute = true : null - isRefresh && this.selectingSitePlan.imageUrl? this.backGroundScale() : null let beforeOneId = this.selectingSitePlan.id || '' //当前 选中 平面图 楼层/区域 id let companyBuildingData = JSON.parse(JSON.stringify( this.canvasData.originalcompanyBuildingData || {} )) // 当前 单位/建筑 数据