mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-03-21 17:50:29 -05:00
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:
parent
ae5543256a
commit
f28b1e9bf3
|
|
@ -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');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user