סקר מחקר: נשמח לשמוע על החוויה שלך עם Blockly
לפתיחת הסקר
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
blockly > RenderedConnection > distanceFrom
שיטת RenderedConnection.distanceFrom()
הפונקציה מחזירה את המרחק בין החיבור הזה לחיבור אחר ביחידות של סביבת עבודה.
Signature:
distanceFrom(otherConnection: Connection): number;
פרמטרים
פרמטר |
סוג |
תיאור |
otherConnection |
חיבור |
החיבור השני שאליו רוצים למדוד את המרחק. |
החזרות:
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 `distanceFrom()` method calculates the distance between two connections in a Blockly workspace."],["It takes another connection as input and returns the distance between them as a numerical value representing workspace units."]]],["The `distanceFrom()` method, part of the `RenderedConnection` class, calculates the distance between two connections. It accepts one parameter, `otherConnection`, of type `Connection`, representing the connection to measure against. The method returns a `number` value, which represents the distance separating the two connections, measured in workspace units. The core action is the calculation of the distance, with the other connection serving as the reference point.\n"]]