調査アンケート: Blockly のご利用体験についてお聞かせください
アンケートを開始
ブロックする >svgResize
svgResize 変数
SVG 画像のサイズをコンテナいっぱいに調整します。ビューが実際にサイズが変更されたとき(ウィンドウのサイズ変更やデバイスの向きの変更など)に呼び出されます。コンテンツが変更されたとき(ブロックが追加または削除されたときなど)にワークスペースのサイズを変更するには、workspace.resizeContents をご覧ください。SVG 画像の高さと幅を記録します。
署名:
svgResize: typeof common.svgResize
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は 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."]]],[]]