סקר מחקר: נשמח לשמוע על החוויה שלך עם Blockly
לפתיחת הסקר
blockly > Flyout > setMetrics_
שיטת Flyout.setMetrics_()
מגדיר את התרגום של התפריט הנפתח כך שיתאים לסרגלי הגלילה.
Signature:
protected abstract 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-09-12 (שעון UTC).
[null,null,["עדכון אחרון: 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"]]