rename param

This commit is contained in:
Mutasem 2021-11-02 14:26:35 +01:00
parent 9596bb850d
commit bc647e0a5d
2 changed files with 4 additions and 4 deletions

View file

@ -342,7 +342,7 @@
_super = _jp.Connectors.N8nAbstractConnector.apply(this, arguments), _super = _jp.Connectors.N8nAbstractConnector.apply(this, arguments),
midpoint = params.midpoint == null ? 0.5 : params.midpoint, midpoint = params.midpoint == null ? 0.5 : params.midpoint,
alwaysRespectStubs = params.alwaysRespectStubs === true, alwaysRespectStubs = params.alwaysRespectStubs === true,
yOffset = params.yOffset || 0, loopbackVerticalLength = params.loopbackVerticalLength || 0,
lastx = null, lasty = null, lastOrientation, lastx = null, lasty = null, lastOrientation,
cornerRadius = params.cornerRadius != null ? params.cornerRadius : 0, cornerRadius = params.cornerRadius != null ? params.cornerRadius : 0,
loopbackMinimum = params.loopbackMinimum || 100, loopbackMinimum = params.loopbackMinimum || 100,
@ -512,12 +512,12 @@
midy; midy;
if (diffX < (-1 * loopbackMinimum)) { if (diffX < (-1 * loopbackMinimum)) {
midy = paintInfo.startStubY - (diffX < 0 ? direction * yOffset : 0); midy = paintInfo.startStubY - (diffX < 0 ? direction * loopbackVerticalLength : 0);
} else { } else {
midy = paintInfo.startStubY + ((paintInfo.endStubY - paintInfo.startStubY) * midpoint); 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; midy = 0;
} }

View file

@ -47,7 +47,7 @@ export const CONNECTOR_FLOWCHART_TYPE = ['N8nFlowchart', {
stub: JSPLUMB_FLOWCHART_STUB + 10, stub: JSPLUMB_FLOWCHART_STUB + 10,
gap: 5, gap: 5,
alwaysRespectStubs: true, 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 loopbackMinimum: 140, // minimum length before flowchart loops around
indexOffset: 10, // stub offset between different endpoints of same node indexOffset: 10, // stub offset between different endpoints of same node
}]; }];