연구 설문조사: Blockly 사용 경험을 알려주세요
설문조사 시작
상수 제공자
ConstantProvider
는 다른 모든 렌더기 구성요소와 기본 제공 필드와 같은 Blockly의 다른 부분에서 사용하는 매직 번호, 도형, 문자열의 모음입니다.
모든 상수 값은 상수로 간주됩니다. 런타임에 값을 변경하면 렌더링 버그가 발생합니다.
연결 형태
상수 제공자에는 다양한 연결의 표준 형태에 관한 정의가 포함되어 있습니다. Notch
는 다음 연결과 이전 연결의 형태를 정의합니다. 그리고 PuzzleTab
는 입력 및 출력 연결의 모양을 정의합니다. 이러한 이름은 기본 렌더기가 제공하는 도형을 기반으로 합니다.
검사에 따른 연결 형태
상수 제공자는 연결 확인에 따라 연결 형태를 동적으로 정의할 수도 있습니다. 이 작업은 shapeFor
메서드를 사용하여 이루어집니다.
기타 다양한 경로
상수 제공자는 또한 접힌 블록의 들쭉날쭉한 가장자리와 같이 블록의 다른 다양한 부분의 경로도 정의합니다.
기타 다양한 값
마지막으로, 상수 제공자는 다양한 요소 사이의 패딩이나 행의 최소 높이와 같은 다양한 값도 정의합니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2023-12-02(UTC)
[null,null,["최종 업데이트: 2023-12-02(UTC)"],[[["The `ConstantProvider` stores essential values like shapes, strings, and numbers used by Blockly's rendering components."],["It defines standard shapes for different connection types, including notches for previous/next connections and puzzle tabs for input/output connections."],["Connection shapes can be dynamically determined based on connection checks using the `shapeFor` method."],["The `ConstantProvider` also defines paths for elements like collapsed block edges and various values for padding and minimum heights."],["Modifying `ConstantProvider` values during runtime is discouraged as it can lead to rendering issues."]]],["The `ConstantProvider` stores essential rendering data for Blockly, including connection shapes, paths, and values. It defines standard connection shapes like `Notch` for next/previous connections and `PuzzleTab` for input/output. The `shapeFor` method allows dynamic shape definition based on connection checks. Additionally, it defines paths for block components, like jagged edges, and values for padding and minimum row heights, ensuring consistent rendering. Changing these values at runtime will cause rendering issues.\n"]]