Shumoku Docs

ドキュメントを検索

共通文書と現行公開版

検索を読み込み中…

English

@shumoku/core · 0.4.0 · function

movePort

ソース

APIの説明は英語のcanonical sourceを表示しています。

Move a port to the nearest edge of its node based on cursor position. Changes the port's side and redistributes all ports. Returns null if the side didn't change.

movePort(portId: string, svgX: number, svgY: number, nodes: Map<string, Node>, ports: Map<string, ResolvedPort>): { nodes: Map<string, Node>; ports: Map<string, ResolvedPort> } | null

パラメーター

名前 説明 既定値
portId string 追加説明はありません。
svgX number 追加説明はありません。
svgY number 追加説明はありません。
nodes Map<string, Node> 追加説明はありません。
ports Map<string, ResolvedPort> 追加説明はありません。

戻り値

{ nodes: Map<string, Node>; ports: Map<string, ResolvedPort> } | null

libs/@shumoku/core/src/layout/interaction.ts:861