license import { ViewportRuler } from '@angular/cdk/scrolling' ; import { DOCUMENT } from '@angular/common' ; import { ElementRef , Inject , Injectable , Optional } from '@angular/core' ; import { OriginConnectionPosition , OverlayConnectionPosition } from './connected-position' ; import { ConnectedPositionStrategy } from './connected-position-strategy' ; import { FlexibleConnectedPositionStrategy } from './flexible-connected-position-strategy' ; import { GlobalPositionStrategy } from './global-position-strategy' ; import { Platform } from '@angular/cdk/platform' ; import { OverlayContainer } from '../overlay-container' ; /** Builder for overlay position strategy. */ @ Injectable ( { providedIn : 'root' } ) export class OverlayPositionBuilder { constructor ( private _viewportRuler , @ Inject ( DOCUMENT ) private _document , @ Optional ( ) private _platform ? , @ Optional ( ) private _overlayContainer ? ) { } /**
     * Creates a global position strategy.
     */ global ( ) { return new GlobalPositionStrategy ( ) ; } param elementRef param originPos param overlayPos deprecated breaking-change connectedTo ( elementRef , originPos , overlayPos ) { return new ConnectedPositionStrategy ( originPos , overlayPos , elementRef , this . _viewportRuler , this . _document ) ; } param elementRef flexibleConnectedTo ( elementRef ) { return new FlexibleConnectedPositionStrategy ( elementRef , this . _viewportRuler , this . _document , this . _platform , this . _overlayContainer ) ; } }