차단 > ConnectionDB > searchForClosest

ConnectionDB.searchForClosest() 메서드

이 연결과 가장 가까운 호환 연결을 찾습니다.

서명:

searchForClosest(conn: RenderedConnection, maxRadius: number, dxy: Coordinate): {
        connection: RenderedConnection | null;
        radius: number;
    };

매개변수

매개변수 유형 설명
Conn RenderedConnection 잘 어울리는 상대를 찾는 인맥이란 이런 것이죠.
maxRadius 숫자 다른 연결의 최대 반경입니다.
dxy 좌표 데이터베이스에서 이 연결의 위치와 현재 위치 사이의 오프셋입니다 (드래그 결과).

반환:

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

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