fix: text sizes for damage

This commit is contained in:
cha0s 2019-04-23 03:42:25 -05:00
parent 62918b176f
commit 41bf8f606f

View File

@ -7,17 +7,17 @@ class DamageTextNode extends TextNode {
super(amount);
// Big numbers are literally big.
if (amount > 999) {
this.span.style.fontSize = '14px';
}
else if (amount > 99) {
this.span.style.fontSize = '12px';
}
else if (amount > 9) {
else if (amount > 99) {
this.span.style.fontSize = '10px';
}
else {
else if (amount > 9) {
this.span.style.fontSize = '8px';
}
else {
this.span.style.fontSize = '6px';
}
// Class by affinity and whether it's damage or healing.
this.span.className += ' ' + damageSpec.affinity;
if (isDamage) {