|
|
|
@ -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 = []; |
|
|
|
|