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;