Updates the value indicator tooltip ui for the given thumb.
(source: _MatSliderThumb)
| 739 | |
| 740 | /** Updates the value indicator tooltip ui for the given thumb. */ |
| 741 | _updateValueIndicatorUI(source: _MatSliderThumb): void { |
| 742 | if (this._skipUpdate()) { |
| 743 | return; |
| 744 | } |
| 745 | |
| 746 | const valuetext = this.displayWith(source.value); |
| 747 | |
| 748 | this._hasViewInitialized |
| 749 | ? source._valuetext.set(valuetext) |
| 750 | : source._hostElement.setAttribute('aria-valuetext', valuetext); |
| 751 | |
| 752 | if (this.discrete) { |
| 753 | source.thumbPosition === _MatThumb.START |
| 754 | ? (this.startValueIndicatorText = valuetext) |
| 755 | : (this.endValueIndicatorText = valuetext); |
| 756 | |
| 757 | const visualThumb = this._getThumb(source.thumbPosition); |
| 758 | valuetext.length < 3 |
| 759 | ? visualThumb._hostElement.classList.add('mdc-slider__thumb--short-value') |
| 760 | : visualThumb._hostElement.classList.remove('mdc-slider__thumb--short-value'); |
| 761 | } |
| 762 | } |
| 763 | |
| 764 | /** Updates all value indicator UIs in the slider. */ |
| 765 | private _updateValueIndicatorUIs(): void { |
no test coverage detected