연구 설문조사: Blockly 사용 경험을 알려주세요
설문조사 시작
blockly > ConnectionChecker
ConnectionChecker 클래스
연결 유형 확인 로직의 클래스입니다.
서명:
export declare class ConnectionChecker implements IConnectionChecker
구현: IConnectionChecker
메서드
메서드 |
수정자 |
설명 |
canConnect(a, b, isDragging, opt_distance) |
|
현재 연결이 대상 연결과 연결할 수 있는지 확인합니다. |
canConnectToPrevious_(a, b) |
protected |
드래그 확인을 위한 도우미 함수입니다. |
canConnectWithReason(a, b, isDragging, opt_distance) |
|
현재 연결이 대상 연결에 연결할 수 있는지 확인하고 문제가 있는 경우 오류 코드를 반환합니다. |
doDragChecks(a, b, distance) |
|
드래그하여 연결할 수 있는지 확인하세요. |
doSafetyChecks(a, b) |
|
지정된 연결이 안전한지 확인합니다. 즉, Blockly의 기본적인 가정을 위반하지 않는지 (예: 자체 연결 없음) 확인합니다. |
doTypeChecks(a, b) |
|
값 유형 시스템과 관련하여 이 연결이 다른 연결과 호환되는지 확인합니다. 예를 들어 square_root("Hello")는 호환되지 않습니다. |
getErrorMessage(errorCode, a, b) |
|
연결 오류 코드를 문자열로 변환하는 도우미 메서드입니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-10-16(UTC)
[null,null,["최종 업데이트: 2024-10-16(UTC)"],[[["The `ConnectionChecker` class in Blockly manages the logic for validating connections between blocks."],["It provides methods to check connection compatibility based on type, safety, and drag restrictions."],["These checks ensure that connections adhere to Blockly's rules and prevent invalid block configurations."],["Developers can use `ConnectionChecker` to determine if two connections can be joined and understand the reasons for any connection failures."]]],[]]