@@ -60,6 +60,7 @@ export class OverlaySampleComponent implements OnInit {
6060 public modal = true ;
6161 public useOutlet = false ;
6262 public hasAnimation = true ;
63+ public keepInPlace = false ;
6364 public animationLength = 300 ; // in ms
6465
6566 private xAddition = 0 ;
@@ -90,7 +91,8 @@ export class OverlaySampleComponent implements OnInit {
9091 positionStrategy : new AutoPositionStrategy ( ) ,
9192 scrollStrategy : new NoOpScrollStrategy ( ) ,
9293 modal : false ,
93- closeOnOutsideClick : true
94+ closeOnOutsideClick : true ,
95+ keepInPlace : this . keepInPlace
9496 } ;
9597 this . horizontalDirection = 'Right' ;
9698 this . verticalDirection = 'Bottom' ;
@@ -106,7 +108,8 @@ export class OverlaySampleComponent implements OnInit {
106108 positionStrategy : new ConnectedPositioningStrategy ( ) ,
107109 scrollStrategy : new NoOpScrollStrategy ( ) ,
108110 modal : false ,
109- closeOnOutsideClick : true
111+ closeOnOutsideClick : true ,
112+ keepInPlace : this . keepInPlace
110113 } ;
111114 this . horizontalDirection = 'Right' ;
112115 this . verticalDirection = 'Bottom' ;
@@ -147,7 +150,8 @@ export class OverlaySampleComponent implements OnInit {
147150 } ) ,
148151 scrollStrategy : new NoOpScrollStrategy ( ) ,
149152 modal : false ,
150- closeOnOutsideClick : true
153+ closeOnOutsideClick : true ,
154+ keepInPlace : this . keepInPlace
151155 } ;
152156 this . horizontalDirection = 'Right' ;
153157 this . verticalDirection = 'Bottom' ;
@@ -225,7 +229,7 @@ export class OverlaySampleComponent implements OnInit {
225229 positionStrategy : stringMapping [ 'PositionStrategy' ] [ this . positionStrategy ] ,
226230 scrollStrategy : stringMapping [ 'ScrollStrategy' ] [ this . scrollStrategy ] ,
227231 modal : this . modal ,
228- closeOnOutsideClick : this . closeOnOutsideClick
232+ closeOnOutsideClick : this . closeOnOutsideClick ,
229233 } ;
230234 this . _overlaySettings . positionStrategy . settings . verticalDirection =
231235 stringMapping [ 'VerticalDirection' ] [ this . verticalDirection ] ;
@@ -236,6 +240,7 @@ export class OverlaySampleComponent implements OnInit {
236240 this . _overlaySettings . positionStrategy . settings . horizontalStartPoint =
237241 stringMapping [ 'HorizontalStartPoint' ] [ this . horizontalStartPoint ] ;
238242 this . _overlaySettings . outlet = this . useOutlet ? this . outletElement : null ;
243+ this . _overlaySettings . keepInPlace = this . keepInPlace ;
239244 }
240245
241246 public onSwitchChange ( ev : IChangeCheckboxEventArgs ) {
@@ -249,6 +254,9 @@ export class OverlaySampleComponent implements OnInit {
249254 case 'outlet' :
250255 this . _overlaySettings . outlet = ev . checked ? this . outletElement : null ;
251256 break ;
257+ case 'keepInPlace' :
258+ this . _overlaySettings . keepInPlace = ev . checked ;
259+ break ;
252260 }
253261 }
254262
0 commit comments