File tree Expand file tree Collapse file tree 4 files changed +7
-2
lines changed Expand file tree Collapse file tree 4 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export class OverlayService {
3030 parentInjector : injector ,
3131 position : {
3232 type : PopoverPositionType . Fixed ,
33- location : PopoverFixedPositionLocation . RightUnderHeader
33+ location : config . position ?? PopoverFixedPositionLocation . RightUnderHeader
3434 } ,
3535 data : metadata
3636 } ) ;
Original file line number Diff line number Diff line change 11import { InjectionToken } from '@angular/core' ;
22import { Observable } from 'rxjs' ;
3+ import { PopoverFixedPositionLocation } from '../../popover/popover' ;
34import { OverlayConfig } from './../overlay' ;
45
56export interface SheetOverlayConfig < TData = unknown > extends OverlayConfig {
67 size : SheetSize ;
78 data ?: TData ;
9+ position ?: PopoverFixedPositionLocation . Right | PopoverFixedPositionLocation . RightUnderHeader ;
810}
911
1012export const enum SheetSize {
Original file line number Diff line number Diff line change @@ -107,6 +107,8 @@ export class PopoverPositionBuilder {
107107 switch ( popoverPosition . location ) {
108108 case PopoverFixedPositionLocation . Centered :
109109 return globalPosition . centerHorizontally ( ) . centerVertically ( ) ;
110+ case PopoverFixedPositionLocation . Right :
111+ return globalPosition . right ( '0' ) . top ( '0' ) ;
110112 case PopoverFixedPositionLocation . RightUnderHeader :
111113 default :
112114 return globalPosition . right ( '0' ) . top ( this . headerHeight ?? '0' ) ;
Original file line number Diff line number Diff line change @@ -64,7 +64,8 @@ export const enum PopoverRelativePositionLocation {
6464
6565export const enum PopoverFixedPositionLocation {
6666 RightUnderHeader ,
67- Centered
67+ Centered ,
68+ Right
6869}
6970
7071export const POPOVER_DATA = new InjectionToken < unknown > ( 'POPOVER_DATA' ) ;
You can’t perform that action at this time.
0 commit comments