From da139a47d14f3d2326ce369f913c5f9ac74f22e3 Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Sat, 19 Aug 2023 15:52:14 +0100 Subject: [PATCH] Fix text position Dont render hidden textareas --- js/workflowImage.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/workflowImage.js b/js/workflowImage.js index fe4791c..2820ec2 100644 --- a/js/workflowImage.js +++ b/js/workflowImage.js @@ -53,10 +53,11 @@ class WorkflowImage { app.canvas.ds.offset = [-bounds[0], -bounds[1]]; } - getDrawTextConfig() { + getDrawTextConfig(_, widget) { return { x: 10, - y: LiteGraph.NODE_TITLE_HEIGHT, + y: widget.last_y + 10, + resetTransform: false, }; } @@ -539,6 +540,7 @@ app.registerExtension({ const draw = w.widget.draw; w.widget.draw = function (ctx) { draw.apply(this, arguments); + if (this.inputEl.hidden) return; if (getDrawTextConfig) { const config = getDrawTextConfig(ctx, this);