From 7ae82c2090cb5d58770f1a9fe7e6b1e4f518ff93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Mon, 14 Dec 2020 17:45:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=83=8C=E6=99=AF=E5=9B=BE?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E4=B8=BA=E7=A9=BA=E6=97=B6=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/working-area/working-area.component.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index f497eae..0f70b27 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -506,6 +506,10 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.setPaintMode(PaintMode.endPaint); this.resetCanvas(); this.destroyBackgroundImage(); + if (this.canvasData.selectStorey.imageUrl === null) { + return; + } + console.log(this.canvasData.selectStorey.imageUrl); await this.createBackgroundImage(this.canvasData.selectStorey.imageUrl); this.createFloorShape(); if (this.canvasData.gameMode === GameMode.Assignment) { @@ -644,7 +648,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.backgroundImage.y = this.app.view.height / 2; this.backgroundImage.interactive = true; this.backgroundImage.name = 'background'; - + this.backgroundImage.angle = this.canvasData.selectStorey.imageAngle; // const left = this.init.element.nativeElement.querySelector('.functionalDomainLeft').clientWidth; // const right = this.init.element.nativeElement.querySelector('.functionalDomainRight').clientWidth; const imageWidth = this.backgroundImage.texture.width; @@ -924,9 +928,10 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV if (!this.canvasData.selectStorey.imageUrl) { this.backgroundImage.visible = false; } else { - this.backgroundImage.texture = PIXI.Texture.from(this.canvasData.selectStorey.imageUrl); - this.backgroundImage.angle = this.canvasData.selectStorey.imageAngle; - this.backgroundImage.visible = true; + // this.backgroundImage.texture = PIXI.Texture.from(this.canvasData.selectStorey.imageUrl); + // this.backgroundImage.angle = this.canvasData.selectStorey.imageAngle; + // this.backgroundImage.visible = true; + this.refresh(); } } /** @@ -1158,7 +1163,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV case PaintMode.Pipeline: if (this.canvasData.selectTemplateData.name !== '水带') { this.emit('createIcon', this.paintingShape); - this.paintingShape = null; } break; }