Shumoku Docs

ドキュメントを検索

共通文書と現行公開版

検索を読み込み中…

English

@shumoku/core · 0.4.0 · function

placePorts

ソース

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

Compose the three phases: decide sides → order each side → compute absolute coordinates → emit `ResolvedPort`s keyed by `nodeId:portId`. Port sides are re-seated from final geometry (see reseatPortsByGeometry) so wires exit toward their peer regardless of how the upstream/downstream tree was inferred. Ports are positioned along each side by distributePortsAlongSide (peer-aligned), with computePortPosition's even spread as the fallback.

placePorts(nodes: Map<string, Node>, links: Link[], direction?: Direction): Map<string, ResolvedPort>

パラメーター

名前 説明 既定値
nodes Map<string, Node> 追加説明はありません。
links Link[] 追加説明はありません。
direction Direction 追加説明はありません。 'TB'

戻り値

Map<string, ResolvedPort>

libs/@shumoku/core/src/layout/auto-placement/flat-tree/port-placement.ts:405