|
|
|
@ -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); |
|
|
|
|