MCPcopy Index your code
hub / github.com/angular/components / _updatePosition

Method _updatePosition

src/material/tooltip/tooltip.ts:596–605  ·  view source on GitHub ↗

Updates the position of the current tooltip.

(overlayRef: OverlayRef)

Source from the content-addressed store, hash-verified

594
595 /** Updates the position of the current tooltip. */
596 private _updatePosition(overlayRef: OverlayRef) {
597 const position = overlayRef.getConfig().positionStrategy as FlexibleConnectedPositionStrategy;
598 const origin = this._getOrigin();
599 const overlay = this._getOverlayPosition();
600
601 position.withPositions([
602 this._addOffset({...origin.main, ...overlay.main}),
603 this._addOffset({...origin.fallback, ...overlay.fallback}),
604 ]);
605 }
606
607 /** Adds the configured offset to a position. Used as a hook for child classes. */
608 protected _addOffset(position: ConnectedPosition): ConnectedPosition {

Callers 2

positionMethod · 0.95
_createOverlayMethod · 0.95

Calls 5

_getOriginMethod · 0.95
_getOverlayPositionMethod · 0.95
_addOffsetMethod · 0.95
getConfigMethod · 0.80
withPositionsMethod · 0.80

Tested by

no test coverage detected