From 99dd956265de614f165725229f3b3647abceaf15 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Mon, 17 Aug 2020 13:53:07 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E5=8F=B3=E4=BE=A7=E7=B4=A0?= =?UTF-8?q?=E6=9D=90=E5=B1=9E=E6=80=A7=E6=A0=8F=E5=90=91=E4=B8=8A=E6=8B=96?= =?UTF-8?q?=E5=8A=A8=E8=B0=83=E6=95=B4=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collection-tools.component.html | 2 +- .../collection-tools.component.ts | 22 +++++++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html index 45d95ab..e7887a5 100644 --- a/src/app/ui/collection-tools/collection-tools.component.html +++ b/src/app/ui/collection-tools/collection-tools.component.html @@ -270,7 +270,7 @@
-
+
diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index c808898..74156e4 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -330,15 +330,14 @@ export class CollectionToolsComponent implements OnInit { firecategoriesDivMouseDown(e){ document.onmousemove = (ev) => { let bodyHeight = document.body.clientHeight //网页宽度 + console.log(this.element.nativeElement.querySelector('#firecategories').clientHeight) let maxHeight = this.element.nativeElement.querySelector('#rightDiv').clientHeight - 35 //最大宽度 if(bodyHeight - ev.clientY >= maxHeight){ - this.element.nativeElement.querySelector('#firecategories').style.height = maxHeight + 'px' - this.element.nativeElement.querySelector('#property').style.height = 35 + 'px' + this.element.nativeElement.querySelector('#firecategories').style.height = maxHeight+ 'px' + this.element.nativeElement.querySelector('#property').style.height = 35+ 'px' }else{ - let sucai = this.element.nativeElement.querySelector('#firecategories').style.height = bodyHeight - ev.clientY ; - - this.element.nativeElement.querySelector('#property').style.height = this.element.nativeElement.querySelector('#rightDiv').clientHeight - sucai - + this.element.nativeElement.querySelector('#firecategories').style.height = (bodyHeight - ev.clientY) + 'px' ; + this.element.nativeElement.querySelector('#property').style.height = (this.element.nativeElement.querySelector('#rightDiv').clientHeight - this.element.nativeElement.querySelector('#firecategories').clientHeight) + 'px' } } document.onmouseup = () => { @@ -520,7 +519,16 @@ export class CollectionToolsComponent implements OnInit { // this.setAssetsProperty(this.proObject) //测试 } - + ngAfterViewInit(): void { + // 监听canvas组件选中素材事件 + this.canvas.on("select",obj=>{ + console.log(99999999999,obj) + }) + // 监听canvas组件取消选中素材事件 + this.canvas.on("deselect ",obj=>{ + console.log(99999999999,obj) + }) + } //点击基本信息名称 basicInfoClick(){ this.basicInfo = !this.basicInfo