refactor: pixel font sizes

This commit is contained in:
cha0s 2019-04-23 03:25:24 -05:00
parent 487e45e112
commit 3f0d7833b5

View File

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