final NodeView sourceView = mapView.getNodeView(draggedLink.getSource());
if (targetView != null && sourceView != null) {
final Point targetLinkPoint = targetView.getLinkPoint(draggedLink.getEndInclination());
final Point sourceLinkPoint = sourceView.getLinkPoint(draggedLink.getStartInclination());
distSqToTarget = targetLinkPoint.distanceSq(originX, originY);
distSqToSource = sourceLinkPoint.distanceSq(originX, originY);
}
if ((targetView == null || sourceView != null) && distSqToSource <= distSqToTarget * 2.25) {
final Point changedInclination = draggedLink.getStartInclination();
draggedLink.changeInclination(deltaX, deltaY, draggedLink.getSource(), changedInclination);
draggedLink.setStartInclination(changedInclination);