|
|
|
@ -59,20 +59,15 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
// 根据ID 找到数据
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => { |
|
|
|
|
// console.log('按下了' + event.keyCode);
|
|
|
|
|
if (event.keyCode === 17) { |
|
|
|
|
this.selection.isMultiselection = true; |
|
|
|
|
// this.setNameVisible(true, 0);
|
|
|
|
|
this.copy(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.eventManager.addGlobalEventListener('window', 'keyup', (event: any) => { |
|
|
|
|
// console.log('弹起了' + event.keyCode);
|
|
|
|
|
if (event.keyCode === 17) { |
|
|
|
|
this.selection.isMultiselection = false; |
|
|
|
|
} |
|
|
|
|
if (event.keyCode === 46) { |
|
|
|
|
|
|
|
|
|
this.selection.objects.forEach(item => { |
|
|
|
|
// 删除 选中的数据
|
|
|
|
|
if (item.assetData.IsFromBuilding) { |
|
|
|
@ -93,6 +88,15 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
// 测试代码
|
|
|
|
|
this.eventManager.addGlobalEventListener('window', 'keypress', (event: any) => { |
|
|
|
|
if (event.keyCode === 97) { |
|
|
|
|
this.copy(); |
|
|
|
|
} |
|
|
|
|
if (event.keyCode === 115) { |
|
|
|
|
this.paste('1', '2', '3'); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ngAfterViewInit(): void { |
|
|
|
|