Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
blockly > IMetricsManager > getToolboxMetrics
Pobiera szerokość, wysokość i położenie panelu narzędzi na obszarze roboczym w koordynatach pikseli. Zwraca 0 dla szerokości i wysokości, jeśli obszar roboczy ma prosty zestaw narzędzi zamiast zestawu narzędzi kategorii. Aby uzyskać szerokość i wysokość prostego zestawu narzędzi, zobacz IMetricsManager.getFlyoutMetrics().
Podpis:
getToolboxMetrics(): ToolboxMetrics;
Zwroty:
ToolboxMetrics
Obiekt o szerokości, wysokości i pozycji narzędzia.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-05-16 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-05-16 UTC."],[[["`IMetricsManager.getToolboxMetrics()` provides the dimensions and position of the toolbox on the workspace."],["Returned measurements are in pixels and may be 0 for width and height if the workspace uses a simple, rather than category-based, toolbox."],["Use alternative methods for obtaining dimensions of a simple toolbox, as indicated in the documentation."]]],["The `getToolboxMetrics()` method retrieves the dimensions and location of the toolbox on the workspace. It returns a `ToolboxMetrics` object containing the toolbox's width, height, and position in pixel coordinates. For workspaces with a simple toolbox, the method returns a width and height of 0; alternative methods should be used to determine simple toolbox dimensions. This method is part of the `IMetricsManager` interface.\n"]]