Browse Source

[完善] 注释代码

develop
陈鹏飞 4 years ago
parent
commit
4418eec40d
  1. 4
      src/app/navigation/navigation.component.html
  2. 45
      src/app/ui/collection-tools/collection-tools.component.ts

4
src/app/navigation/navigation.component.html

@ -9,8 +9,8 @@
<!-- basicinfo -->
<li [routerLink]="['/datacollection/basicinfo']" routerLinkActive="router-link-active">基本信息</li>
<!-- plan -->
<li [routerLink]="['/datacollection/plan']" routerLinkActive="router-link-active">平面图</li>
<li [routerLink]="['/datacollection/collectionTools']" routerLinkActive="router-link-active">H5平面图</li>
<!-- <li [routerLink]="['/datacollection/plan']" routerLinkActive="router-link-active">平面图</li> -->
<li [routerLink]="['/datacollection/collectionTools']" routerLinkActive="router-link-active">平面图</li>
<!-- allaround -->
<li [routerLink]="['/datacollection/allaround']" routerLinkActive="router-link-active">四周毗邻</li>
<!-- fire-fighting-device -->

45
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 || {} )) // 当前 单位/建筑 数据

Loading…
Cancel
Save