@@ -93,11 +93,16 @@ <h5>A custom Dialog - template</h5>
9393< p > Username: {{ username }}</ p >
9494
9595< button
96+ #editUserButton
9697 mdl-button mdl-button-type ="raised " mdl-colored ="primary "
9798 mdl-ripple (click) ="editUserDialog.show() "> Edit User Dialog</ button >
9899
99100< mdl-dialog #editUserDialog
100- [mdl-dialog-config] ="{clickOutsideToClose: true, styles:{'width': '350px'}, isModal: true} "
101+ [mdl-dialog-config] ="{
102+ clickOutsideToClose: true,
103+ styles:{'width': '350px'},
104+ isModal: true,
105+ openFrom: editUserButton } "
101106 (show) ="onDialogShow($event) "
102107 (hide) ="onDialogHide() ">
103108 < h3 class ="mdl-dialog__title "> Edit User</ h3 >
@@ -112,11 +117,15 @@ <h3 class="mdl-dialog__title">Edit User</h3>
112117
113118< pre prism >
114119<![CDATA[
115- < button mdl-button mdl-button-type ="raised " mdl-colored ="primary "
120+ < button #editUserButton mdl-button mdl-button-type ="raised " mdl-colored ="primary "
116121 mdl-ripple (click) ="editUserDialog.show() "> Edit User Dialog</ button >
117122
118123< mdl-dialog #editUserDialog
119- [mdl-dialog-config] ="{clickOutsideToClose: true, styles:{'width': '350px'}, isModal:true} "
124+ [mdl-dialog-config] ="{
125+ clickOutsideToClose: true,
126+ styles:{'width': '300px'},
127+ isModal:true,
128+ openFrom: editUserButton} "
120129 (show) ="onDialogShow(dialogRef) "
121130 (hide) ="onDialogHide() ">
122131 < h3 class ="mdl-dialog__title "> Edit User</ h3 >
@@ -167,7 +176,9 @@ <h5>Attributes of the mdl-dialog component</h5>
167176</ table >
168177
169178< h5 > Dialog configuration object</ h5 >
170-
179+ < p > Not all of these parameters are available for < i > alert</ i > and < i > confirm</ i > . If you need these
180+ parameters please use the < i > showDialog</ i > method of the < i > MdlDialogService</ i > to create these
181+ dialogs.</ p >
171182< table class ="docu " mdl-shadow ="2 ">
172183 < thead >
173184 < tr >
@@ -215,5 +226,22 @@ <h5>Dialog configuration object</h5>
215226 </ td >
216227 </ tr >
217228
229+ < tr >
230+ < td > openFrom?: < br /> MdlButtonComponent | < br /> MouseEvent | < br /> OpenCloseRect</ td >
231+ < td >
232+ Use a show animation for the dialag that starts at a MdlButtonComponent, a MousEvent or a OpenCloseRect. From all
233+ of these types the top, left, width and height will be used to create the starting point and startings size of
234+ the dialog animation.
235+ </ td >
236+ </ tr >
237+
238+ < tr >
239+ < td > closeTo?: < br /> MdlButtonComponent | < br /> MouseEvent | < br /> OpenCloseRect</ td >
240+ < td >
241+ Use a show animation for the dialag that ends at a MdlButtonComponent, a MousEvent or a OpenCloseRect. From all
242+ of these types the top, left, width and height will be used to create the end point and end size of
243+ the dialog animation.
244+ </ td >
245+ </ tr >
218246 </ tbody >
219247</ table>
0 commit comments