mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
comments
This commit is contained in:
parent
8c22d55ae4
commit
134b2f8a3e
|
@ -538,14 +538,16 @@
|
||||||
|
|
||||||
const diffX = paintInfo.endStubX - paintInfo.startStubX;
|
const diffX = paintInfo.endStubX - paintInfo.startStubX;
|
||||||
const diffY = paintInfo.endStubY - paintInfo.startStubY;
|
const diffY = paintInfo.endStubY - paintInfo.startStubY;
|
||||||
const direction = diffY >= 0 ? 1 : -1;
|
const direction = diffY >= 0 ? 1 : -1; // vertical direction of loop, above or below source
|
||||||
|
|
||||||
var midx = paintInfo.startStubX + ((paintInfo.endStubX - paintInfo.startStubX) * midpoint),
|
var midx = paintInfo.startStubX + ((paintInfo.endStubX - paintInfo.startStubX) * midpoint),
|
||||||
midy;
|
midy;
|
||||||
|
|
||||||
if (diffX < (-1 * loopbackMinimum)) {
|
if (diffX < (-1 * loopbackMinimum)) {
|
||||||
|
// loop backward behavior
|
||||||
midy = paintInfo.startStubY - (diffX < 0 ? direction * loopbackVerticalLength : 0);
|
midy = paintInfo.startStubY - (diffX < 0 ? direction * loopbackVerticalLength : 0);
|
||||||
} else {
|
} else {
|
||||||
|
// original flowchart behavior
|
||||||
midy = paintInfo.startStubY + ((paintInfo.endStubY - paintInfo.startStubY) * midpoint);
|
midy = paintInfo.startStubY + ((paintInfo.endStubY - paintInfo.startStubY) * midpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue