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

Method updatePositionStrategy

src/cdk/overlay/overlay-ref.ts:332–347  ·  view source on GitHub ↗

Switches to a new position strategy and updates the overlay position.

(strategy: PositionStrategy)

Source from the content-addressed store, hash-verified

330
331 /** Switches to a new position strategy and updates the overlay position. */
332 updatePositionStrategy(strategy: PositionStrategy): void {
333 if (strategy === this._positionStrategy) {
334 return;
335 }
336
337 if (this._positionStrategy) {
338 this._positionStrategy.dispose();
339 }
340
341 this._positionStrategy = strategy;
342
343 if (this.hasAttached()) {
344 strategy.attach(this);
345 this.updatePosition();
346 }
347 }
348
349 /** Update the size properties of the overlay. */
350 updateSize(sizeConfig: OverlaySizeConfig): void {

Callers 3

colspanMethod · 0.80
ngOnChangesMethod · 0.80
overlay.spec.tsFile · 0.80

Calls 4

hasAttachedMethod · 0.95
updatePositionMethod · 0.95
disposeMethod · 0.65
attachMethod · 0.65

Tested by

no test coverage detected