diff --git a/src/demo-app/dialog/dialog-demo.ts b/src/demo-app/dialog/dialog-demo.ts index 5e91c097f9aa..f1bda594ec4b 100644 --- a/src/demo-app/dialog/dialog-demo.ts +++ b/src/demo-app/dialog/dialog-demo.ts @@ -57,15 +57,32 @@ export class DialogDemo { @Component({ selector: 'demo-jazz-dialog', template: ` -

It's Jazz!

-

-

{{ jazzMessage }}

- ` +

It's Jazz!

+

+

{{ jazzMessage }}

+ + + ` }) export class JazzDialog { + private _positionToggle = false; + jazzMessage = 'Jazzy jazz jazz'; constructor(public dialogRef: MdDialogRef) { } + + togglePosition(): void { + this._positionToggle = !this._positionToggle; + + if (this._positionToggle) { + this.dialogRef.updateDimensions(null, null, { + top: '25px', + left: '25px' + }); + } else { + this.dialogRef.updateDimensions(); + } + } } @@ -104,7 +121,7 @@ export class JazzDialog { color="primary" href="https://en.wikipedia.org/wiki/Neptune" target="_blank">Read more on Wikipedia - +