封鎖 >飛出 >setMetrics_
Flyout.setMetrics_() 方法
設定與捲軸相符的飛出翻譯。
Signature:
protected abstract setMetrics_(xyRatio: {
x?: number;
y?: number;
}): void;
參數
參數 |
類型 |
說明 |
xyRatio |
{ x?: number;y?:數字;} |
包含 y 屬性,該屬性是介於 0 和 1 之間的浮動值,用於指定捲動角度和類似的 x 屬性。 |
傳回:
void
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-09-12 (世界標準時間)。
[null,null,["上次更新時間:2024-09-12 (世界標準時間)。"],[[["The `Flyout.setMetrics_()` method adjusts the flyout's position to align with the scrollbars."],["It takes an `xyRatio` object as input, which contains `x` and `y` properties representing the horizontal and vertical scroll positions, respectively."],["This method is protected and abstract, meaning it is intended for internal use and needs to be implemented by subclasses."]]],["The `setMetrics_()` method adjusts the flyout's position based on scrollbar positions. It accepts an `xyRatio` object containing optional `x` and `y` properties. These properties, ranging from 0 to 1, dictate the degree of scrolling in the horizontal and vertical directions, respectively. The method's core action is to translate the flyout to align with the current scroll state, using the provided `xyRatio` to determine the correct translation. It does not return any value.\n"]]