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

Function _getMaxScrollDistance

src/material/tabs/paginated-tab-header.ts:612–616  ·  view source on GitHub ↗

* Determines what is the maximum length in pixels that can be set for the scroll distance. This * is equal to the difference in width between the tab list container and tab header container. * * This is an expensive call that forces a layout reflow to compute box and scroll metrics and *

()

Source from the content-addressed store, hash-verified

610 * should be called sparingly.
611 */
612 _getMaxScrollDistance(): number {
613 const lengthOfTabList = this._tabListInner.nativeElement.scrollWidth;
614 const viewLength = this._tabListContainer.nativeElement.offsetWidth;
615 return lengthOfTabList - viewLength || 0;
616 }
617
618 /** Tells the ink-bar to align itself to the current label wrapper */
619 _alignInkBarToSelectedTab(): void {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected