סקר מחקר: נשמח לשמוע על החוויה שלך עם Blockly
לפתיחת הסקר
blockly > HorizontalFlyout > setMetrics_
שיטת HarizontalFlyout.setMetrics_()
מגדיר את התרגום של התפריט הנפתח כך שיתאים לסרגלי הגלילה.
Signature:
protected setMetrics_(xyRatio: {
x: number;
y: number;
}): void;
פרמטרים
פרמטר |
סוג |
תיאור |
xyRatio |
{ x: number; y: number; } |
מכילה את המאפיין y שהוא צף בין 0 ל-1, שמציין את רמת הגלילה ומאפיין x דומה. |
החזרות:
ריק
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-08-21 (שעון UTC).
[null,null,["עדכון אחרון: 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"]]