fix(grid-snapping): use correct align values for segment snapping

This commit is contained in:
Maciej Barelkowski 2019-05-23 16:00:46 +02:00 committed by merge-me[bot]
parent 274d62bf35
commit 86b3069eaf
1 changed files with 2 additions and 2 deletions

View File

@ -62,13 +62,13 @@ LayoutConnectionBehavior.prototype.snapMiddleSegments = function(waypoints) {
if (horizontallyAligned(aligned)) {
// snap horizontally
segmentStart.x = segmentEnd.x = gridSnapping.snapValue(segmentStart.x);
segmentStart.y = segmentEnd.y = gridSnapping.snapValue(segmentStart.y);
}
if (verticallyAligned(aligned)) {
// snap vertically
segmentStart.y = segmentEnd.y = gridSnapping.snapValue(segmentStart.y);
segmentStart.x = segmentEnd.x = gridSnapping.snapValue(segmentStart.x);
}
});