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 {
30
30
parentInjector : injector ,
31
31
position : {
32
32
type : PopoverPositionType . Fixed ,
33
- location : PopoverFixedPositionLocation . RightUnderHeader
33
+ location : config . position ?? PopoverFixedPositionLocation . RightUnderHeader
34
34
} ,
35
35
data : metadata
36
36
} ) ;
Original file line number Diff line number Diff line change 1
1
import { InjectionToken } from '@angular/core' ;
2
2
import { Observable } from 'rxjs' ;
3
+ import { PopoverFixedPositionLocation } from '../../popover/popover' ;
3
4
import { OverlayConfig } from './../overlay' ;
4
5
5
6
export interface SheetOverlayConfig < TData = unknown > extends OverlayConfig {
6
7
size : SheetSize ;
7
8
data ?: TData ;
9
+ position ?: PopoverFixedPositionLocation . Right | PopoverFixedPositionLocation . RightUnderHeader ;
8
10
}
9
11
10
12
export const enum SheetSize {
Original file line number Diff line number Diff line change @@ -107,6 +107,8 @@ export class PopoverPositionBuilder {
107
107
switch ( popoverPosition . location ) {
108
108
case PopoverFixedPositionLocation . Centered :
109
109
return globalPosition . centerHorizontally ( ) . centerVertically ( ) ;
110
+ case PopoverFixedPositionLocation . Right :
111
+ return globalPosition . right ( '0' ) . top ( '0' ) ;
110
112
case PopoverFixedPositionLocation . RightUnderHeader :
111
113
default :
112
114
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 {
64
64
65
65
export const enum PopoverFixedPositionLocation {
66
66
RightUnderHeader ,
67
- Centered
67
+ Centered ,
68
+ Right
68
69
}
69
70
70
71
export const POPOVER_DATA = new InjectionToken < unknown > ( 'POPOVER_DATA' ) ;
You can’t perform that action at this time.
0 commit comments