blockly > HorizontalFlyout > setMetrics_
طريقة HorizontalFlyout.setMetrics_()
لضبط ترجمة القائمة المنبثقة كي تتطابق مع أشرطة التمرير.
Signature:
protected setMetrics_(xyRatio: {
x: number;
y: number;
}): void;
المعلمات
المعلمة |
النوع |
الوصف |
xyRatio |
{ x: رقم؛ y: رقم؛ } |
يحتوي على خاصية y وهي عدد عائم بين 0 و1 يحدد درجة التمرير وخاصية x مشابهة. |
المرتجعات:
فراغ
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 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"]]