From 5bdc1d8b22ee7de1201450b18e2e146a939b5dd0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-474NEJQ\\xzsjob" <359059686@qq.com> Date: Tue, 8 Sep 2020 17:30:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=8B=E4=BB=B6=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/working-area/working-area.component.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 09efe03..70992db 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -141,7 +141,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV if (this.backgroundImage.scale.x >= 32) { this.backgroundImage.scale.x = 32; this.backgroundImage.scale.y = 32; - this.emit('mouseWheel', this.backgroundImage.scale.x); + this.emit('backgroundScale', this.backgroundImage.scale.x); return; } this.backgroundImage.pivot.set(pivot.x, pivot.y); @@ -155,7 +155,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV if (this.backgroundImage.scale.x <= 0.1) { this.backgroundImage.scale.x = 0.1; this.backgroundImage.scale.y = 0.1; - this.emit('mouseWheel', this.backgroundImage.scale.x); + this.emit('backgroundScale', this.backgroundImage.scale.x); return; } this.backgroundImage.pivot.set(pivot.x, pivot.y); @@ -166,7 +166,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.backgroundImage.position.x += delX; this.backgroundImage.position.y += delY; } - this.emit('mouseWheel', this.backgroundImage.scale.x); + this.emit('backgroundScale', this.backgroundImage.scale.x); } /** * 创建画布 @@ -586,7 +586,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV */ public setBackgroundScale(scale: number): void { this.backgroundImage.scale.set(scale); - this.emit('mouseWheel', this.backgroundImage.scale.x); + this.emit('backgroundScale', this.backgroundImage.scale.x); } /** * 设置背景图角度 @@ -910,7 +910,7 @@ export class SinglePointIcon extends PIXI.Container { }); - this.workingArea.on('mouseWheel', data => { + this.workingArea.on('backgroundScale', data => { if (this.assetData.FixedSize) { const scale = 1 / data; console.log(scale);