陈鹏飞 5 years ago
parent
commit
32e5be6f9e
  1. 2
      src/app/ui/collection-tools/collection-tools.component.html
  2. 22
      src/app/ui/collection-tools/collection-tools.component.ts

2
src/app/ui/collection-tools/collection-tools.component.html

@ -270,7 +270,7 @@
<!-- 消防要素 -->
<div id="firecategories" class="firecategories" style="height: 50%;">
<!-- 素材属性div鼠标拖动div -->
<div style="height:3px;width: 100%;position: absolute;top: 0;cursor: n-resize;z-index: 1000;background-color: red;" (mousedown)="firecategoriesDivMouseDown($event)"></div>
<div style="height:3px;width: 100%;position: absolute;top: 0;cursor: n-resize;z-index: 1000;" (mousedown)="firecategoriesDivMouseDown($event)"></div>
<div class="title">
<div>

22
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

Loading…
Cancel
Save