Frontend - fix flickers (#44)

* fix flicker for list labels by not recreating
* only show rejoin button when connected
* fix initial flicker on text
This commit is contained in:
lucas authored and GitHub committed 2026-05-04 21:07:48 +02:00
1 parent 9a3851f802
commit 14516a878f
5 files changed
+90 -84

No files matched your search

+6
View File
@@ -5,5 +5,11 @@ type ConstructProperties = ex.LabelOptions & ex.ActorArgs;
export class Text extends ex.Label {
constructor(options?: ConstructProperties) {
super(options);
// ex.Label sets this.text before this.font in its constructor, so
// _calculateDimension() runs with the default Font instead of options.font.
// Re-setting triggers recalculation with the now-correct font.
// eslint-disable-next-line no-self-assign
this.text = this.text;
}
}