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

Function _checkScrollingControls

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

* Evaluate whether the before and after controls should be enabled or disabled. * If the header is at the beginning of the list (scroll distance is equal to 0) then disable the * before button. If the header is at the end of the list (scroll distance is equal to the * maximum distance we ca

()

Source from the content-addressed store, hash-verified

592 * should be called sparingly.
593 */
594 _checkScrollingControls() {
595 if (this.disablePagination) {
596 this._disableScrollAfter = this._disableScrollBefore = true;
597 } else {
598 // Check if the pagination arrows should be activated.
599 this._disableScrollBefore = this.scrollDistance == 0;
600 this._disableScrollAfter = this.scrollDistance == this._getMaxScrollDistance();
601 this._changeDetectorRef.markForCheck();
602 }
603 }
604
605 /**
606 * Determines what is the maximum length in pixels that can be set for the scroll distance. This

Callers

nothing calls this directly

Calls 1

markForCheckMethod · 0.80

Tested by

no test coverage detected