From bc647e0a5d539325d20bfd09b62c7ce86800cc60 Mon Sep 17 00:00:00 2001 From: Mutasem Date: Tue, 2 Nov 2021 14:26:35 +0100 Subject: [PATCH] rename param --- packages/editor-ui/src/plugins/N8nFlowchartType.js | 6 +++--- packages/editor-ui/src/views/canvasHelpers.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/editor-ui/src/plugins/N8nFlowchartType.js b/packages/editor-ui/src/plugins/N8nFlowchartType.js index 39288f67b7..07c0313d11 100644 --- a/packages/editor-ui/src/plugins/N8nFlowchartType.js +++ b/packages/editor-ui/src/plugins/N8nFlowchartType.js @@ -342,7 +342,7 @@ _super = _jp.Connectors.N8nAbstractConnector.apply(this, arguments), midpoint = params.midpoint == null ? 0.5 : params.midpoint, alwaysRespectStubs = params.alwaysRespectStubs === true, - yOffset = params.yOffset || 0, + loopbackVerticalLength = params.loopbackVerticalLength || 0, lastx = null, lasty = null, lastOrientation, cornerRadius = params.cornerRadius != null ? params.cornerRadius : 0, loopbackMinimum = params.loopbackMinimum || 100, @@ -512,12 +512,12 @@ midy; if (diffX < (-1 * loopbackMinimum)) { - midy = paintInfo.startStubY - (diffX < 0 ? direction * yOffset : 0); + midy = paintInfo.startStubY - (diffX < 0 ? direction * loopbackVerticalLength : 0); } else { midy = paintInfo.startStubY + ((paintInfo.endStubY - paintInfo.startStubY) * midpoint); } - if (diffX < 0 && diffX > (-1 * yOffset) && Math.abs(diffY) < yOffset) { + if (diffX < 0 && diffX > (-1 * loopbackVerticalLength) && Math.abs(diffY) < loopbackVerticalLength) { midy = 0; } diff --git a/packages/editor-ui/src/views/canvasHelpers.ts b/packages/editor-ui/src/views/canvasHelpers.ts index 7e9e64eda5..e7ebae8fd0 100644 --- a/packages/editor-ui/src/views/canvasHelpers.ts +++ b/packages/editor-ui/src/views/canvasHelpers.ts @@ -47,7 +47,7 @@ export const CONNECTOR_FLOWCHART_TYPE = ['N8nFlowchart', { stub: JSPLUMB_FLOWCHART_STUB + 10, gap: 5, alwaysRespectStubs: true, - yOffset: NODE_SIZE, // length of vertical segment when looping + loopbackVerticalLength: NODE_SIZE, // length of vertical segment when looping loopbackMinimum: 140, // minimum length before flowchart loops around indexOffset: 10, // stub offset between different endpoints of same node }];