cleanup
This commit is contained in:
parent
b00d24dbf7
commit
29ccb52c93
3 changed files with 20 additions and 12 deletions
|
@ -65,17 +65,13 @@ export class WaScaleManager {
|
|||
return;
|
||||
}
|
||||
this.zoomModifier = this.getTargetZoomModifierFor(this.focusTarget.width, this.focusTarget.height);
|
||||
this.game.events.emit("wa-scale-manager:refresh-focus-on-target");
|
||||
this.game.events.emit("wa-scale-manager:refresh-focus-on-target", this.focusTarget);
|
||||
}
|
||||
|
||||
public setFocusTarget(targetDimensions?: { x: number; y: number; width: number; height: number }): void {
|
||||
this.focusTarget = targetDimensions;
|
||||
}
|
||||
|
||||
public getFocusTarget(): { x: number; y: number; width: number; height: number } | undefined {
|
||||
return this.focusTarget;
|
||||
}
|
||||
|
||||
public getTargetZoomModifierFor(viewportWidth: number, viewportHeight: number) {
|
||||
const { width: gameWidth, height: gameHeight } = coWebsiteManager.getGameSize();
|
||||
const devicePixelRatio = window.devicePixelRatio ?? 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue