@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