Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
blockly > ConnectionDB > searchForClosest
ConnectionDB.searchForClosest() yöntemi
Bu bağlantıya en yakın uyumlu bağlantıyı bulun.
İmza:
searchForClosest(conn: RenderedConnection, maxRadius: number, dxy: Coordinate): {
connection: RenderedConnection | null;
radius: number;
};
Parametreler
Parametre |
Tür |
Açıklama |
bağ |
RenderedConnection |
Uyumlu bir eş arayan bağlantı. |
maxRadius |
sayı |
Başka bir bağlantının maksimum yarıçapı. |
dxy |
Koordinatör |
Bu bağlantının veritabanındaki konumu ile geçerli konum arasındaki uzaklık (sürükleme sonucunda). |
Şunu döndürür:
{ connection: RenderedConnection | null; yarıçap: sayı; }
İki özellik içerir: "bağlantı" Bu değer başka bir bağlantı ya da boş ve "yarıçap"tır yani mesafedir.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-25 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-25 UTC."],[],["The `searchForClosest()` method in `ConnectionDB` locates the nearest compatible connection. It takes a `RenderedConnection` (`conn`), a `maxRadius` (number), and a `Coordinate` (`dxy`) for location offset as parameters. It returns an object containing two properties: `connection`, which is either a found `RenderedConnection` or `null`, and `radius`, the distance to the found connection. The method identifies the closest matching connection within the defined radius.\n"]]