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

Function addLayoutTransitionDamage

src/ink/layoutDamageRows.ts:44–57  ·  view source on GitHub ↗
(
  current: LayoutDamageRows | null,
  previousRect: Pick<Rectangle, 'y' | 'height'> | undefined,
  nextRect: Pick<Rectangle, 'y' | 'height'> | undefined,
)

Source from the content-addressed store, hash-verified

42}
43
44export function addLayoutTransitionDamage(
45 current: LayoutDamageRows | null,
46 previousRect: Pick<Rectangle, 'y' | 'height'> | undefined,
47 nextRect: Pick<Rectangle, 'y' | 'height'> | undefined,
48): LayoutDamageRows | null {
49 let rows = current
50 if (previousRect) {
51 rows = addLayoutDamageRect(rows, previousRect)
52 }
53 if (nextRect) {
54 rows = addLayoutDamageRect(rows, nextRect)
55 }
56 return rows
57}
58
59export function toFullWidthDamageRect(
60 rows: LayoutDamageRows | null,

Callers 2

renderNodeToOutputFunction · 0.85

Calls 1

addLayoutDamageRectFunction · 0.85

Tested by

no test coverage detected