fix up connectors snapping

This commit is contained in:
Mutasem 2021-11-04 10:57:50 +01:00
parent 52554e8357
commit 7abee4889d

View file

@ -236,8 +236,8 @@
oIndex = 1;
so = [];
to = [];
so[index] = params.sourcePos[index] > targetPos[index] ? -1 : 1;
to[index] = -1;//params.sourcePos[index] > targetPos[index] ? 1 : -1; // always default to orienting right
so[index] = 1; //params.sourcePos[index] > targetPos[index] ? -1 : 1; // always default to orienting right
to[index] = -1;//params.sourcePos[index] > targetPos[index] ? 1 : -1; // always default to orienting left
so[oIndex] = 0;
to[oIndex] = 0;
}
@ -526,10 +526,6 @@
midy = paintInfo.startStubY + ((paintInfo.endStubY - paintInfo.startStubY) * midpoint);
}
if (diffX < 0 && diffX > (-1 * loopbackVerticalLength) && Math.abs(diffY) < loopbackVerticalLength) {
midy = 0;
}
var orientations = {x: [0, 1], y: [1, 0]},
lineCalculators = {
perpendicular: function (axis) {