blockly > Çıkış > setMetrics_
Flyout.setMetrics_() yöntemi
Açılır öğenin çevirisini, kaydırma çubuklarıyla eşleşecek şekilde ayarlar.
İmza:
protected abstract setMetrics_(xyRatio: {
x?: number;
y?: number;
}): void;
Parametreler
Parametre |
Tür |
Açıklama |
xyRatio |
{ x?: number; y?: sayı; } |
0 ile 1 arasında bir kayan noktalı, kaydırma derecesini ve benzer bir x özelliğini belirten y özelliğini içerir. |
Şunu döndürür:
geçersiz
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2024-09-12 UTC.
[null,null,["Son güncelleme tarihi: 2024-09-12 UTC."],[[["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"]]