resize the brush editor's text area whenever the brush editor is resized

this can now happen if you use the resize handle
This commit is contained in:
liquidex 2024-09-03 23:12:31 +02:00
parent a924147e26
commit 8f69552b02

View file

@ -31,6 +31,7 @@ export class BrushEditor extends HTMLElement {
});
requestAnimationFrame(() => this.#resizeTextArea());
document.fonts.addEventListener("loadingdone", () => this.#resizeTextArea());
new ResizeObserver(() => this.#resizeTextArea()).observe(this);
this.errorHeader = this.appendChild(document.createElement("h1"));
this.errorHeader.classList.add("error-header");