Switches to a new position strategy and updates the overlay position.
(strategy: PositionStrategy)
| 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 { |
no test coverage detected