_scrollToLabel(labelIndex) {
        const /** @type {?} */ selectedLabel = this._labelWrappers ? this._labelWrappers.toArray()[labelIndex] : null;
        if (!selectedLabel) {
            return;
        }
        // The view length is the visible width of the tab labels.
        const /** @type {?} */ viewLength = this._tabListContainer.nativeElement.offsetWidth;
        let /** @type {?} */ labelBeforePos, /** @type {?} */ labelAfterPos;
        if (this._getLayoutDirection() == 'ltr') {
            labelBeforePos = selectedLabel.getOffsetLeft();
            labelAfterPos = labelBeforePos + selectedLabel.getOffsetWidth();
        }
        else {
            labelAfterPos = this._tabList.nativeElement.offsetWidth - selectedLabel.getOffsetLeft();
            labelBeforePos = labelAfterPos - selectedLabel.getOffsetWidth();
        }
        const /** @type {?} */ beforeVisiblePos = this.scrollDistance;
        const /** @type {?} */ afterVisiblePos = this.scrollDistance + viewLength;
        if (labelBeforePos < beforeVisiblePos) {
            // Scroll header to move label to the before direction
            this.scrollDistance -= beforeVisiblePos - labelBeforePos + EXAGGERATED_OVERSCROLL;
        }
        else if (labelAfterPos > afterVisiblePos) {
            // Scroll header to move label to the after direction
            this.scrollDistance += labelAfterPos - afterVisiblePos + EXAGGERATED_OVERSCROLL;
        }
    }
/**
     * Moves the tab list such that the desired tab label (marked by index) is moved into view.
     *
     * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
     * should be called sparingly.
     * @param {?} labelIndex
     * @return {?}
     */
Moves the tab list such that the desired tab label (marked by index) is moved into view.
This is an expensive call that forces a layout reflow to compute box and scroll metrics and
should be called sparingly.
@param {?} labelIndex
@return {?}
Moves the tab list such that the desired tab label ( marked by index ) is moved into view . This is an expensive call that forces a layout reflow to compute box and scroll metrics and should be called sparingly . @param { ? } labelIndex @return { ? }
_scrollToLabel(labelIndex) {
        const  selectedLabel = this._labelWrappers ? this._labelWrappers.toArray()[labelIndex] : null;
        if (!selectedLabel) {
            return;
        }
        const  viewLength = this._tabListContainer.nativeElement.offsetWidth;
        let  labelBeforePos,  labelAfterPos;
        if (this._getLayoutDirection() == 'ltr') {
            labelBeforePos = selectedLabel.getOffsetLeft();
            labelAfterPos = labelBeforePos + selectedLabel.getOffsetWidth();
        }
        else {
            labelAfterPos = this._tabList.nativeElement.offsetWidth - selectedLabel.getOffsetLeft();
            labelBeforePos = labelAfterPos - selectedLabel.getOffsetWidth();
        }
        const  beforeVisiblePos = this.scrollDistance;
        const  afterVisiblePos = this.scrollDistance + viewLength;
        if (labelBeforePos < beforeVisiblePos) {
            this.scrollDistance -= beforeVisiblePos - labelBeforePos + EXAGGERATED_OVERSCROLL;
        }
        else if (labelAfterPos > afterVisiblePos) {
            this.scrollDistance += labelAfterPos - afterVisiblePos + EXAGGERATED_OVERSCROLL;
        }
    }
_scrollToLabel ( labelIndex ) { const selectedLabel = this . _labelWrappers ? this . _labelWrappers . toArray ( ) [ labelIndex ] : null ; if ( ! selectedLabel ) { return ; } const viewLength = this . _tabListContainer . nativeElement . offsetWidth ; let labelBeforePos , labelAfterPos ; if ( this . _getLayoutDirection ( ) == 'ltr' ) { labelBeforePos = selectedLabel . getOffsetLeft ( ) ; labelAfterPos = labelBeforePos + selectedLabel . getOffsetWidth ( ) ; } else { labelAfterPos = this . _tabList . nativeElement . offsetWidth - selectedLabel . getOffsetLeft ( ) ; labelBeforePos = labelAfterPos - selectedLabel . getOffsetWidth ( ) ; } const beforeVisiblePos = this . scrollDistance ; const afterVisiblePos = this . scrollDistance + viewLength ; if ( labelBeforePos < beforeVisiblePos ) { this . scrollDistance -= beforeVisiblePos - labelBeforePos + EXAGGERATED_OVERSCROLL ; } else if ( labelAfterPos > afterVisiblePos ) { this . scrollDistance += labelAfterPos - afterVisiblePos + EXAGGERATED_OVERSCROLL ; } }
Moves the tab list such that the desired tab label (marked by index) is moved into view.
Moves the tab list such that the desired tab label ( marked by index ) is moved into view .
/** @type {?} */ // The view length is the visible width of the tab labels. /** @type {?} */ /** @type {?} */ /** @type {?} */ /** @type {?} */ /** @type {?} */ // Scroll header to move label to the before direction // Scroll header to move label to the after direction