封鎖 >HorizontalFlyout >setMetrics_
HorizontalFlyout.setMetrics_() 方法
設定與捲軸相符的飛出翻譯。
Signature:
protected setMetrics_(xyRatio: {
x: number;
y: number;
}): void;
參數
參數 |
類型 |
說明 |
xyRatio |
{ x: 數字;y 為數字;} |
包含 y 屬性,該屬性是介於 0 和 1 之間的浮動值,用於指定捲動角度和類似的 x 屬性。 |
傳回:
void
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-21 (世界標準時間)。
[null,null,["上次更新時間:2024-08-21 (世界標準時間)。"],[[["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"]]