MCPcopy Create free account
hub / github.com/angular/components / updatePositionStrategy

Method updatePositionStrategy

src/cdk/overlay/overlay-ref.ts:359–374  ·  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

357
358 /** Switches to a new position strategy and updates the overlay position. */
359 updatePositionStrategy(strategy: PositionStrategy): void {
360 if (strategy === this._positionStrategy) {
361 return;
362 }
363
364 if (this._positionStrategy) {
365 this._positionStrategy.dispose();
366 }
367
368 this._positionStrategy = strategy;
369
370 if (this.hasAttached()) {
371 strategy.attach(this);
372 this.updatePosition();
373 }
374 }
375
376 /** Update the size properties of the overlay. */
377 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