fix(grid-snapping): use correct align values for segment snapping
This commit is contained in:
parent
274d62bf35
commit
86b3069eaf
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue