blockly > HorizontalFlyout > setMetrics_
HorizontalFlyout.setMetrics_() yöntemi
Açılır öğenin çevirisini, kaydırma çubuklarıyla eşleşecek şekilde ayarlar.
İmza:
protected 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-08-21 UTC.
[null,null,["Son güncelleme tarihi: 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"]]