From 5438342a350b25d87dbe7938f6edace2f1a2379f Mon Sep 17 00:00:00 2001 From: Mutasem Date: Thu, 28 Oct 2021 18:06:15 +0200 Subject: [PATCH] add label offset --- packages/editor-ui/src/views/NodeView.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/editor-ui/src/views/NodeView.vue b/packages/editor-ui/src/views/NodeView.vue index d956774895..25a1dd1982 100644 --- a/packages/editor-ui/src/views/NodeView.vue +++ b/packages/editor-ui/src/views/NodeView.vue @@ -244,9 +244,16 @@ const getFlowChartType = (connection: Connection) => { const inputIndex = connection.__meta ? connection.__meta.targetOutputIndex : 0; const outputIndex = connection.__meta ? connection.__meta.sourceOutputIndex : 0; + const outputEndpoint = connection.endpoints[0]; + const outputOverlay = outputEndpoint.getOverlay('output-name-label'); + let labelOffset = 0; + if (outputOverlay && outputOverlay.label && outputOverlay.label.length > 1) { + labelOffset = 16; + } + return ['N8nFlowchart', { cornerRadius: 4, - stub: JSPLUMB_FLOWCHART_STUB + 10 * outputIndex + 10 * inputIndex, + stub: JSPLUMB_FLOWCHART_STUB + 10 * outputIndex + 10 * inputIndex + labelOffset, gap: 5, alwaysRespectStubs: _ALWAYS_RESPECT_STUB, yOffset: NODE_SIZE + 5,