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