קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
blockly > blockRendering > RenderInfo > getElemCenterline_
שיטת blockRendering.RenderInfo.getElemCenterline_()
מחשבים את קו האמצע של רכיב בשורה שעברה רינדור. יישום הבסיס הזה מציב את קו האמצע באמצע השורה באופן אנכי, ללא מקרים מיוחדים. סביר להניח שתצטרכו לוגיקה נוספת כדי לטפל (לכל הפחות) בשורות העליונות והתחתונות.
Signature:
protected getElemCenterline_(row: Row, elem: Measurable): number;
פרמטרים
החזרות:
number
קו האמצע הרצוי של הרכיב הנתון, כהיסט מהפינה השמאלית העליונה של הבלוק.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],["The `getElemCenterline_()` method calculates the vertical centerline of an element within a rendered row. It positions the centerline at the row's vertical midpoint. The method takes a `Row` and a `Measurable` element as input. It returns a number representing the element's centerline offset from the block's top-left corner. Custom implementations are often needed to adjust positioning for specific rows.\n"]]