blockly > RenderedConnection > closest
RenderedConnection.closest() 메서드
이 연결에 가장 가까운 호환되는 연결을 찾습니다. 모든 매개변수는 작업공간 단위에 있습니다.
Signature:
closest(maxLimit: number, dxy: Coordinate): {
connection: RenderedConnection | null;
radius: number;
};
매개변수
매개변수 | 유형 | 설명 |
---|---|---|
maxLimit | 숫자 | 다른 연결에 대한 최대 반경입니다. |
DXY | 좌표 | 데이터베이스에서 이 연결의 위치와 드래그로 인한 현재 위치 간의 오프셋입니다. |
반환:
{ connection: RenderedConnection | null; radius: number; }
두 속성, 즉 다른 연결 또는 null인 'connection' 속성과 거리인 'radius' 속성을 포함합니다.