연구 설문조사: Blockly 사용 경험을 알려주세요
설문조사 시작
차단 > svgResize
svg크기 조절 변수
컨테이너를 완전히 채우도록 SVG 이미지의 크기를 조정합니다. 뷰의 크기가 실제로 변경될 때 (예: 창 크기 조절/기기 방향 변경 시) 이 메서드를 호출합니다. 콘텐츠가 변경될 때 (예: 블록 추가 또는 제거) 작업공간의 크기를 조절하려면 workspace.resizeContents를 참고하세요. SVG 이미지의 높이/너비를 기록합니다.
서명:
svgResize: typeof common.svgResize
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-08-22(UTC)
[null,null,["최종 업데이트: 2024-08-22(UTC)"],[[["`svgResize` is a function used to resize the SVG image within its container to ensure it fills the space completely."],["This function should be called when the container's size changes, such as during window resizing or device orientation changes."],["`svgResize` is distinct from `workspace.resizeContents`, which is used for resizing when the workspace content changes (e.g., adding or removing blocks)."],["The function records the updated height and width of the SVG image after resizing."]]],[]]