WarUI

Viewport and rendered-range events

GRID-A06-F19P1baselinePlanned

WarGrid emits events describing the visible range and the rendered range (including overscan), with scroll direction and velocity hints. Applications use these to drive lazy loading, analytics-free prefetching or external minimaps. Events are coalesced to at most one per frame.

Planned. This page shows the specification from issue #183. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

200,000 rows with a side panel logging viewport events and a minimap showing the visible window.

Expected behavior

The log shows one entry per frame at most during scrolling. The minimap window follows the scrolling. Velocity hints reflect fling speed and decay to 0 when scrolling stops.

Planned API surface

onViewportChangeonRenderedRangeChangegetVisibleRange()scrollDirectionscrollVelocityHint

Acceptance criteria

  • The visible range excludes overscan; the rendered range includes it. (pending)
  • No more than one onViewportChange fires per animation frame. (pending)
  • A final event fires when scrolling settles, with velocity 0. (pending)
  • No data leaves the browser through these events (they are local callbacks only). (pending)