MCPcopy
hub / github.com/angular/components / _updateTooltipMessage

Method _updateTooltipMessage

src/material/tooltip/tooltip.ts:695–713  ·  view source on GitHub ↗

Updates the tooltip message and repositions the overlay according to the new message length

()

Source from the content-addressed store, hash-verified

693
694 /** Updates the tooltip message and repositions the overlay according to the new message length */
695 private _updateTooltipMessage() {
696 // Must wait for the message to be painted to the tooltip so that the overlay can properly
697 // calculate the correct positioning based on the size of the text.
698 if (this._tooltipInstance) {
699 this._tooltipInstance.message = this.message;
700 this._tooltipInstance._markForCheck();
701
702 afterNextRender(
703 () => {
704 if (this._tooltipInstance) {
705 this._overlayRef!.updatePosition();
706 }
707 },
708 {
709 injector: this._injector,
710 },
711 );
712 }
713 }
714
715 /** Updates the tooltip class */
716 private _setTooltipClass(

Callers 2

messageMethod · 0.95
showMethod · 0.95

Calls 2

_markForCheckMethod · 0.45
updatePositionMethod · 0.45

Tested by

no test coverage detected