Bad logic in display. Somehow never encountered this??? Resolves #3
This commit is contained in:
parent
3c88de83b8
commit
74935eb50c
|
@ -33,7 +33,7 @@ class Display {
|
||||||
this.source = new Dimensions(width, height);
|
this.source = new Dimensions(width, height);
|
||||||
if (this.source.getRatio() > this.screen.getRatio()) {
|
if (this.source.getRatio() > this.screen.getRatio()) {
|
||||||
console.log('a');
|
console.log('a');
|
||||||
this.display = new Dimensions(this.screen.width, Math.floor(this.source.width / this.source.getRatio()));
|
this.display = new Dimensions(this.screen.width, Math.floor(this.screen.width / this.source.getRatio()));
|
||||||
offset = this.screen.height - this.display.height;
|
offset = this.screen.height - this.display.height;
|
||||||
this.offset = { x: 0, y: Math.round(offset / 2) };
|
this.offset = { x: 0, y: Math.round(offset / 2) };
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ export class Display {
|
||||||
this.source = new Dimensions(width, height);
|
this.source = new Dimensions(width, height);
|
||||||
if (this.source.getRatio() > this.screen.getRatio()) {
|
if (this.source.getRatio() > this.screen.getRatio()) {
|
||||||
console.log('a');
|
console.log('a');
|
||||||
this.display = new Dimensions(this.screen.width, Math.floor(this.source.width / this.source.getRatio()));
|
this.display = new Dimensions(this.screen.width, Math.floor(this.screen.width / this.source.getRatio()));
|
||||||
offset = this.screen.height - this.display.height;
|
offset = this.screen.height - this.display.height;
|
||||||
this.offset = { x: 0, y : Math.round(offset / 2) };
|
this.offset = { x: 0, y : Math.round(offset / 2) };
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue