Browse Source

新增多选开启关闭方法

zhuzhou
徐振升 4 years ago
parent
commit
38cabc485d
  1. 43
      src/app/working-area/working-area.component.ts

43
src/app/working-area/working-area.component.ts

@ -159,24 +159,34 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
PIXI.utils.skipHello();
this.sayHello();
this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => {
event.stopPropagation();
if (event.keyCode === 17) {
this.isCtrlKeyClicked = true;
}
// event.stopPropagation();
// if (event.keyCode === 17) {
// this.isCtrlKeyClicked = true;
// }
});
this.eventManager.addGlobalEventListener('window', 'keyup', (event: any) => {
event.stopPropagation();
if (event.keyCode === 17) {
this.isCtrlKeyClicked = false;
this.rectToolGraphics.visible = false;
this.rectToolGraphics.clear();
}
// event.stopPropagation();
// if (event.keyCode === 17) {
// this.isCtrlKeyClicked = false;
// this.rectToolGraphics.visible = false;
// this.rectToolGraphics.clear();
// }
// 按Del键删除选中的图标
if (event.keyCode === 46) {
this.deleteSelectedShape();
}
});
}
public setMulitSelect(b: boolean) {
if (b) {
this.isCtrlKeyClicked = true;
} else {
this.isCtrlKeyClicked = false;
this.rectToolGraphics.visible = false;
this.rectToolGraphics.clear();
}
}
/**
*
*/
@ -877,7 +887,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
/**
*
*/
public async refreshBackgroundImage(imageUrl: string = this.canvasData.selectStorey.imageUrl, imageAngle: number = this.canvasData.selectStorey.imageAngle): Promise<void> {
public async refreshBackgroundImage(imageUrl: string, imageAngle: number): Promise<void> {
if (imageUrl === undefined || imageUrl === null || imageUrl === '') {
this.backgroundImage.visible = false;
} else {
@ -911,9 +921,8 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
* @param imageUrl
* @param imageAngle
*/
public async refresh(imageUrl: string = this.canvasData.selectStorey.imageUrl,
imageAngle: number = this.canvasData.selectStorey.imageAngle): Promise<void> {
await this.refreshBackgroundImage();
public async refresh(): Promise<void> {
await this.refreshBackgroundImage(this.canvasData.selectStorey.imageUrl, this.canvasData.selectStorey.imageAngle);
// 清空所有图形
this.deselectAll();
const itemList = [];
@ -1319,7 +1328,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
*
*/
public async onExamineeClickFloor() {
await this.refreshBackgroundImage();
await this.refreshBackgroundImage(this.canvasData.selectStorey.imageUrl,this.canvasData.selectStorey.imageAngle);
// 清空所有图形
this.deselectAll();
const itemList = [];
@ -1346,7 +1355,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
* -
*/
public async onExaminerClickFloor() {
await this.refreshBackgroundImage();
await this.refreshBackgroundImage(this.canvasData.selectStorey.imageUrl,this.canvasData.selectStorey.imageAngle);
// 清空所有图形
this.deselectAll();
const itemList = [];
@ -1372,7 +1381,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
* -
*/
public async onExaminerClickFloor_CreateTestpaper() {
await this.refreshBackgroundImage();
await this.refreshBackgroundImage(this.canvasData.selectStorey.imageUrl,this.canvasData.selectStorey.imageAngle);
// 清空所有图形
this.deselectAll();
const itemList = [];

Loading…
Cancel
Save