diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index 178450d..7c3b888 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -417,9 +417,10 @@ export class CollectionToolsComponent implements OnInit { ngOnInit(): void { this.getAllLibrary() - this.getSitePlan() this.getAllBuildings() + this.getSitePlan() + let that = this window.setTimeout(()=>{ document.getElementById("functionalDomainContent").oncontextmenu = function (event) { @@ -430,7 +431,7 @@ export class CollectionToolsComponent implements OnInit { } - + ngAfterViewInit(): void { // 监听canvas组件选中素材事件 @@ -945,7 +946,7 @@ export class CollectionToolsComponent implements OnInit { let dadHeight = document.querySelector('.functionalDomainContent').clientHeight let left = document.querySelector('.functionalDomainLeft').clientWidth let right = document.querySelector('.functionalDomainRight').clientWidth - let imgWidth = dad - left - right//可是区域内 宽度 + let imgWidth = dad - left - right//可视区域内 宽度 let img = new Image() img.src = this.selectingSitePlan.imageUrl; img.onload = function(){ diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 04262f8..8083e6b 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -135,13 +135,14 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.eventManager.addGlobalEventListener('window', 'keypress', (event: any) => { }); - } - - ngAfterViewInit(): void { setTimeout(() => { this.createCanvas(); }, 0); } + + ngAfterViewInit(): void { + + } /** * * @param event 鼠标滑动事件