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

Function _alignInkBarToSelectedTab

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

Tells the ink-bar to align itself to the current label wrapper

()

Source from the content-addressed store, hash-verified

617
618 /** Tells the ink-bar to align itself to the current label wrapper */
619 _alignInkBarToSelectedTab(): void {
620 const selectedItem =
621 this._items && this._items.length ? this._items.toArray()[this.selectedIndex] : null;
622 const selectedLabelWrapper = selectedItem ? selectedItem.elementRef.nativeElement : null;
623
624 if (selectedLabelWrapper) {
625 this._inkBar.alignToElement(selectedLabelWrapper);
626 } else {
627 this._inkBar.hide();
628 }
629 }
630
631 /** Stops the currently-running paginator interval. */
632 _stopInterval() {

Callers

nothing calls this directly

Calls 2

alignToElementMethod · 0.80
hideMethod · 0.45

Tested by

no test coverage detected