mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-10-02 07:42:12 -05:00
Improved battle low-res width scaling
Should no longer cause flickering when resized on OSes with visible scrollbars.
This commit is contained in:
@@ -59,13 +59,13 @@
|
||||
return true;
|
||||
},
|
||||
updateLayout: function () {
|
||||
var width = this.$el.width();
|
||||
var width = $(window).width();
|
||||
if (width < 950) {
|
||||
this.battle.messageDelay = 800;
|
||||
} else {
|
||||
this.battle.messageDelay = 8;
|
||||
}
|
||||
if (width < 640) {
|
||||
if (width && width < 640) {
|
||||
var scale = (width/640);
|
||||
this.$battle.css('transform', 'scale(' + scale + ')');
|
||||
this.$foeHint.css('transform', 'scale(' + scale + ')');
|
||||
|
||||
Reference in New Issue
Block a user