From 7c9adc1f9073d77954f84431872bfb14d4249514 Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Tue, 5 Sep 2023 17:30:40 +0100 Subject: [PATCH] Fix resizing causing node to shrink --- web/js/showText.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/js/showText.js b/web/js/showText.js index d70d68b..a16540e 100644 --- a/web/js/showText.js +++ b/web/js/showText.js @@ -26,7 +26,15 @@ app.registerExtension({ } requestAnimationFrame(() => { - this.onResize?.(this.computeSize()); + const sz = this.computeSize(); + if (sz[0] < this.size[0]) { + sz[0] = this.size[0]; + } + if (sz[1] < this.size[1]) { + sz[1] = this.size[1]; + } + this.onResize?.(sz); + app.graph.setDirtyCanvas(true, false); }); }