@@ -216,6 +216,41 @@ export class IgxDialogComponent implements IToggleView, OnInit, OnDestroy, After
216216 this . _closeOnOutsideSelect = val ;
217217 }
218218
219+ /**
220+ * Get the position and animation settings used by the dialog.
221+ * ```typescript
222+ * @ViewChild ('alert', { static: true }) public alert: IgxDialogComponent;
223+ * let currentPosition: PositionSettings = this.alert.positionSettings
224+ * ```
225+ */
226+ @Input ( )
227+ public get positionSettings ( ) : PositionSettings {
228+ return this . _positionSettings ;
229+ }
230+
231+ /**
232+ * Set the position and animation settings used by the dialog.
233+ * ```typescript
234+ * import { slideInLeft, slideOutRight } from 'igniteui-angular';
235+ * ...
236+ * @ViewChild ('alert', { static: true }) public alert: IgxDialogComponent;
237+ * public newPositionSettings: PositionSettings = {
238+ * openAnimation: useAnimation(slideInTop, { params: { duration: '2000ms' } }),
239+ * closeAnimation: useAnimation(slideOutBottom, { params: { duration: '2000ms'} }),
240+ * horizontalDirection: HorizontalAlignment.Left,
241+ * verticalDirection: VerticalAlignment.Middle,
242+ * horizontalStartPoint: HorizontalAlignment.Left,
243+ * verticalStartPoint: VerticalAlignment.Middle,
244+ * minSize: { height: 100, width: 100 }
245+ * };
246+ * this.alert.positionSettings = this.newPositionSettings;
247+ * ```
248+ */
249+ public set positionSettings ( settings : PositionSettings ) {
250+ this . _positionSettings = settings ;
251+ this . _overlayDefaultSettings . positionStrategy = new GlobalPositionStrategy ( this . _positionSettings ) ;
252+ }
253+
219254 /**
220255 * An event that is emitted when the dialog is opened.
221256 *```html
@@ -258,7 +293,7 @@ export class IgxDialogComponent implements IToggleView, OnInit, OnDestroy, After
258293 @Output ( )
259294 public onRightButtonSelect = new EventEmitter < IDialogEventArgs > ( ) ;
260295
261- private _animaitonSettings : PositionSettings = {
296+ private _positionSettings : PositionSettings = {
262297 openAnimation : useAnimation ( slideInBottom , { params : { fromPosition : 'translateY(100%)' } } ) ,
263298 closeAnimation : useAnimation ( slideOutTop , { params : { toPosition : 'translateY(-100%)' } } )
264299 } ;
@@ -365,7 +400,7 @@ export class IgxDialogComponent implements IToggleView, OnInit, OnDestroy, After
365400 this . _titleId = IgxDialogComponent . NEXT_ID ++ + '_title' ;
366401
367402 this . _overlayDefaultSettings = {
368- positionStrategy : new GlobalPositionStrategy ( this . _animaitonSettings ) ,
403+ positionStrategy : new GlobalPositionStrategy ( this . _positionSettings ) ,
369404 scrollStrategy : new NoOpScrollStrategy ( ) ,
370405 modal : this . isModal ,
371406 closeOnOutsideClick : this . closeOnOutsideSelect
0 commit comments