Battle frame: Fix height on small screens

This bug hasn't been noticed because the two main uses of battle
frames (the sim itself, and Replays) both absolutely position
battle frames, so they have nothing "below" them.

But on downloaded replays, on screens smaller than 640px across,
they took up an incorrect height. This is also relevant to New
Replays. This commit fixes that.
This commit is contained in:
Guangcong Luo 2023-08-14 04:58:20 +00:00
parent ae5543256a
commit f28b1e9bf3

View File

@ -1176,10 +1176,12 @@ export class Battle {
const scale = (width / 640);
this.scene.$frame?.css('transform', 'scale(' + scale + ')');
this.scene.$frame?.css('transform-origin', 'top left');
this.scene.$frame?.css('margin-bottom', '' + (360 * scale - 360) + 'px');
// this.$foeHint.css('transform', 'scale(' + scale + ')');
} else {
this.scene.$frame?.css('transform', 'none');
// this.$foeHint.css('transform', 'none');
this.scene.$frame?.css('margin-bottom', '0');
}
};