diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..b3c0a09 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "pwa-chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:4300", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/debug.log b/debug.log index 012261b..65a34a7 100644 --- a/debug.log +++ b/debug.log @@ -1 +1,2 @@ [1225/112746.821:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳҲָ· (0x3) +[1225/152100.333:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳҲָ· (0x3) diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 3b313bd..34ce73b 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -507,34 +507,21 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV * 加载考生数据 */ public loadExamineeData() { - this.createBackground();// 创建背景图 - this.refreshBackgroundImage();// 刷新背景图 - this.processinghiddenData();// 处理数据 + this.createBackground(this.canvasData.selectStorey.imageUrl,this.canvasData.selectStorey.imageAngle);// 创建背景图 this.createFloorShape(this.canvasData.originaleveryStoreyData.data);// 基本信息 this.createFloorShape(this.canvasData.examOriginaleveryStoreyData.data);// 考生信息 this.createNodeShape(this.canvasData.selectPanelPoint.Data);// 处置节点 } /** - * 处理隐藏数据 - */ - public processinghiddenData() { - for (let key1 in this.canvasData.originaleveryStoreyData.data){ - for (let key2 in this.canvasData.hiddenBasicInfoFacilities){ - if (this.canvasData.originaleveryStoreyData.data[key1].Id==this.canvasData.hiddenBasicInfoFacilities[key2].Id) { - delete this.canvasData.originaleveryStoreyData.data[key1]; - } - } - } - } - /** - * 异步创建背景图 + * 创建背景图 */ - public createBackground() { + public createBackground(imageUrl:string,imageAngle:number) { if (this.backgroundImage !== null) { this.backgroundImage.destroy(); this.backgroundImage = null; } this.createBackgroundImage() + this.refreshBackgroundImage(imageUrl,imageAngle); } /** * 创建楼层图形 @@ -966,11 +953,11 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV /** * 刷新背景图 */ - public async refreshBackgroundImage(): Promise { - if (!this.canvasData.selectStorey.imageUrl) { + public async refreshBackgroundImage(imageUrl:string,imageAngle:number): Promise { + if (!imageUrl) { this.backgroundImage.visible = false; } else { - this.backgroundImage.texture = await PIXI.Texture.fromURL(this.canvasData.selectStorey.imageUrl); + this.backgroundImage.texture = await PIXI.Texture.fromURL(imageUrl); const imageWidth = this.backgroundImage.texture.width; const imageHeight = this.backgroundImage.texture.height; const appWidth = this.app.view.width - 470; @@ -981,7 +968,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV const scale = wScale < hScale? wScale: hScale; this.backgroundImage.scale.set(scale); - this.backgroundImage.angle = this.canvasData.selectStorey.imageAngle; + this.backgroundImage.angle = imageAngle; this.backgroundImage.visible = true; } }