From 81f6e20b21ba14da7e04f21e426b3c750d369439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Wed, 3 Feb 2021 16:22:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=9B=BE=E6=A0=87=E5=90=8E?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=9B=B8=E6=9C=BA=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/working-area/working-area.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index da4a16a..0aa221d 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -183,6 +183,10 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV } }); } + ngOnDestroy(): void { + this.camera2D.destroy(); + this.app.destroy(); + } public setMulitSelect(b: boolean) { if (b) { @@ -535,6 +539,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV } this.emit('canvasDataChanged'); this.canvasData.isChange = true; + this.updateCamera2D(); }); // /// // this.app.renderer.plugins.interaction.on('pointerdown', (event) => { @@ -1016,7 +1021,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.backgroundImage.texture = this.backgroundTexture; } else { this.backgroundImage.texture = await PIXI.Texture.fromURL(imageUrl); - console.log(imageUrl); } this.backgroundImage.x = this.backgroundImage.width/2; this.backgroundImage.y = this.backgroundImage.height/2;