コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ブロックする >RenderedConnection >最も近い
RenderedConnection.closest() メソッド
この接続に最も近い互換性のある接続を見つけます。すべてのパラメータはワークスペース ユニット内にあります。
署名:
closest(maxLimit: number, dxy: Coordinate): {
connection: RenderedConnection | null;
radius: number;
};
パラメータ
パラメータ |
型 |
説明 |
maxLimit |
数値 |
別の接続までの最大半径。 |
dxy |
座標 |
データベース内のこの接続の位置と現在の位置(ドラッグの結果)とのオフセット。 |
戻り値:
{ connection: RenderedConnection |null;radius: number;}
「connection」という 2 つのプロパティを含む別の接続または null、および「radius」距離です。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 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 `closest()` method in `RenderedConnection` finds the nearest compatible connection within a specified radius (`maxLimit`). It considers an offset (`dxy`) representing a connection's movement. The method returns an object with two properties: `connection`, which is the closest `RenderedConnection` or `null` if none found, and `radius`, the distance to that connection. All calculations use workspace units.\n"]]