MCPcopy Create free account
hub / github.com/Noumena-Network/code / addLayoutDamageRows

Function addLayoutDamageRows

src/ink/layoutDamageRows.ts:23–35  ·  view source on GitHub ↗
(
  current: LayoutDamageRows | null,
  y: number,
  height: number,
)

Source from the content-addressed store, hash-verified

21}
22
23export function addLayoutDamageRows(
24 current: LayoutDamageRows | null,
25 y: number,
26 height: number,
27): LayoutDamageRows | null {
28 const next = normalizeRows(y, height)
29 if (!next) return current
30 if (!current) return next
31
32 const top = Math.min(current.y, next.y)
33 const bottom = Math.max(current.y + current.height, next.y + next.height)
34 return { y: top, height: bottom - top }
35}
36
37export function addLayoutDamageRect(
38 current: LayoutDamageRows | null,

Callers 3

addLayoutDamageRectFunction · 0.85
renderNodeToOutputFunction · 0.85

Calls 2

normalizeRowsFunction · 0.85
maxMethod · 0.80

Tested by

no test coverage detected