MCPcopy Create free account
hub / github.com/angular/components / measureViewportSize

Function measureViewportSize

src/cdk/scrolling/virtual-scrollable.ts:24–27  ·  view source on GitHub ↗

* Measure the viewport size for the provided orientation. * * @param orientation The orientation to measure the size from.

(orientation: 'horizontal' | 'vertical')

Source from the content-addressed store, hash-verified

22 * @param orientation The orientation to measure the size from.
23 */
24 measureViewportSize(orientation: 'horizontal' | 'vertical') {
25 const viewportEl = this.elementRef.nativeElement;
26 return orientation === 'horizontal' ? viewportEl.clientWidth : viewportEl.clientHeight;
27 }
28
29 /**
30 * Measure the bounding DOMRect size including the scroll offset.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected