(label: string, meta = '')
| 102 | * clipped to an ellipsis is worse than a slightly wider box. |
| 103 | */ |
| 104 | export function nodeWidth(label: string, meta = ''): number { |
| 105 | return Math.max( |
| 106 | MIN_NODE_WIDTH, |
| 107 | label.length * CHAR_WIDTH + LABEL_PADDING, |
| 108 | meta.length * META_CHAR_WIDTH + META_PADDING |
| 109 | ); |
| 110 | } |
| 111 | |
| 112 | /** |
| 113 | * The second line of a module box — and the string {@link nodeWidth} sizes for. |
no outgoing calls
no test coverage detected