@shumoku/core · 0.4.0 · function
resolveNodeSize
APIの説明は英語のcanonical sourceを表示しています。
Resolve a node's display size — returns the node's own `size` if set, otherwise asks the engine for its body size. Pass `engine` to share its TextMeasurer cache with other queries. Without one, a process-wide default engine is created lazily; this is fine for one-off helpers but not ideal for hot loops where explicit control matters.
resolveNodeSize(node: { label?: string | string[]; size?: { height: number; width: number }; spec?: NodeSpec }, engine?: LayoutEngine): { height: number; width: number } パラメーター
| 名前 | 型 | 説明 | 既定値 |
|---|---|---|---|
node | { label?: string | string[]; size?: { height: number; width: number }; spec?: NodeSpec } | 追加説明はありません。 | — |
engine | LayoutEngine | 追加説明はありません。 | — |
戻り値
{ height: number; width: number }