차단 > RenderedConnection > . 가장 가까운

RenderedConnection.closest() 메서드

이 연결과 가장 가까운 호환 연결을 찾습니다. 모든 매개변수는 작업공간 단위입니다.

서명:

closest(maxLimit: number, dxy: Coordinate): {
        connection: RenderedConnection | null;
        radius: number;
    };

매개변수

매개변수 유형 설명
maxLimit 숫자 다른 연결의 최대 반경입니다.
dxy 좌표 데이터베이스에서 이 연결의 위치와 현재 위치 사이의 오프셋입니다 (드래그 결과).

반환:

{ connection: RenderedConnection | null; radius: number; }

'connection'이라는 두 가지 속성을 포함합니다. 즉 다른 연결 또는 null이며 'radius' 거리를 나타냅니다.