封鎖 >ConnectionDB >searchForClosest

ConnectionDB.searchForClosest() 方法

找出與這個連線最相容的連線。

Signature:

searchForClosest(conn: RenderedConnection, maxRadius: number, dxy: Coordinate): {
        connection: RenderedConnection | null;
        radius: number;
    };

參數

參數 類型 說明
錐體 RenderedConnection 搜尋相容母親的連結。
maxRadius 數字 另一個連線的最大半徑。
dxy 座標 在這個連線在資料庫中的位置與目前位置之間的偏移 (因拖曳的結果)。

傳回:

{ connection: RenderedConnection |null;半徑:數字;}

包含兩項屬性:「connection」也就是另一個連接或 null,以及「半徑」也就是距離