blockly > ConnectionDB > searchForClosest
ConnectionDB.searchForClosest() メソッド
この接続に最も近い互換性のある接続を探します。
署名:
searchForClosest(conn: RenderedConnection, maxRadius: number, dxy: Coordinate): {
connection: RenderedConnection | null;
radius: number;
};
パラメータ
パラメータ | 種類 | 説明 |
---|---|---|
conn | RenderedConnection | 対応する相手を検索している接続。 |
maxRadius | 数値 | 別の接続への最大半径。 |
DXY | 座標 | データベース内のこの接続の場所と現在の場所(ドラッグ結果として)の間のオフセット。 |
戻り値:
{ connection: RenderedConnection | null; radius: number; }
次の 2 つのプロパティがあります。「connection」は別の接続または null 、「radius」は距離です。