blockly > HorizontalFlyout > setMetrics_
Methode HorizontalFlyout.setMetrics_()
Legt die Übersetzung des Flyouts entsprechend den Bildlaufleisten fest.
Unterschrift:
protected setMetrics_(xyRatio: {
x: number;
y: number;
}): void;
Parameter
Parameter |
Typ |
Beschreibung |
xyRatio |
{ x: number; y: Zahl; } |
Enthält eine y-Eigenschaft, die eine Gleitkommazahl zwischen 0 und 1 ist, die den Scrollgrad und eine ähnliche x-Eigenschaft angibt. |
Gibt zurück:
voidm
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2024-08-21 (UTC).
[null,null,["Zuletzt aktualisiert: 2024-08-21 (UTC)."],[[["The `HorizontalFlyout.setMetrics_()` method adjusts the flyout's position to align with the scrollbars."],["It uses the `xyRatio` parameter, which includes `x` and `y` properties (between 0 and 1) indicating the horizontal and vertical scroll positions, to determine the translation."]]],["The `setMetrics_()` method in `HorizontalFlyout` adjusts the flyout's position based on scrollbar activity. It accepts an `xyRatio` parameter, which contains `x` and `y` properties, both floating-point numbers between 0 and 1. These values indicate the extent of scrolling in each direction. This method then translates the flyout to align with the current scroll positions, it doesn't return any value.\n"]]