調査アンケート: Blockly のご利用体験についてお聞かせください
アンケートを開始
ブロックする >MetricsManager >getFlyoutMetrics
MetricsManager.getFlyoutMetrics() メソッド
フライアウトの幅と高さをピクセル座標で取得します。デフォルトでは、シンプルなフライアウト(ワークスペースが直接所有)またはツールボックスが所有するフライアウトの指標が取得されます。opt_own
を true
として渡すと、シンプルなフライアウトの指標のみが返され、ワークスペースにシンプルなツールボックスではなくカテゴリ ツールボックスがある場合は、幅と高さとして 0 が返されます。
署名:
getFlyoutMetrics(opt_own?: boolean): ToolboxMetrics;
パラメータ
パラメータ |
型 |
説明 |
opt_own |
ブール値 |
(省略可)ワークスペース独自のフライアウト指標のみを返すかどうか。 |
戻り値:
ToolboxMetrics
フライアウトの幅と高さ。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-10-11 UTC。
[null,null,["最終更新日 2024-10-11 UTC。"],[[["`MetricsManager.getFlyoutMetrics()` retrieves the width and height of the workspace's flyout in pixels."],["It can provide metrics for either a simple flyout or the flyout associated with the toolbox."],["Using the optional `opt_own` parameter, you can specifically target the simple flyout's metrics."],["If `opt_own` is true and the workspace uses a category toolbox, the method will return 0 for both width and height."],["The method returns a `ToolboxMetrics` object containing the flyout's width and height."]]],[]]