MCPcopy
hub / github.com/loggerhead/json4u / adjustWidth

Function adjustWidth

src/lib/table/builder.ts:54–59  ·  view source on GitHub ↗
(nd: TableNode)

Source from the content-addressed store, hash-verified

52 // The parent node may be wider than the sum of its child nodes,
53 // so the width difference needs to be allocated to the rightmost child node.
54 const adjustWidth = (nd: TableNode) => {
55 if (nd.parent && nd.borderFlags["right"]) {
56 nd.width = nd.parent.x + nd.parent.width - x;
57 }
58 nd.x = x;
59 };
60
61 const accWidth = (w: number) => {
62 x += w;

Callers 1

fillGridFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected