Skip to content

Commit

Permalink
Merge pull request #24 from Neovici/addedProps
Browse files Browse the repository at this point in the history
Remove modal property, added properties. refs #286
  • Loading branch information
dotpointer committed Nov 1, 2018
2 parents 2d4e7e5 + 666afde commit 0f34f75
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions cosmoz-dialog-behavior.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
*/
Cosmoz.DialogBehaviorImpl = {
properties: {
modal: {
type: Boolean
},

/**
* Set to true to display a backdrop behind the overlay
*/
withBackdrop: {
type: Boolean
type: Boolean,
value: true
},

/**
Expand All @@ -41,6 +41,22 @@
prerender: {
type: Boolean,
value: false
},

/**
* Set to true to disable closing dialog with the ESC key
*/
noCancelOnEscKey: {
type: Boolean,
value: false
},

/**
* Set to true to diable closing dialog when clicking outside of dialog
*/
noCancelOnOutsideClick: {
type: Boolean,
value: true
}
},

Expand Down Expand Up @@ -184,14 +200,12 @@
return;
}

var dialog = document.createElement('paper-dialog');
dialog.modal = this.modal;

if (!this.modal) {
dialog.withBackdrop = this.withBackdrop;
}
const dialog = document.createElement('paper-dialog');

dialog.noAutoFocus = this.noAutoFocus;
dialog.noCancelOnEscKey = this.noCancelOnEscKey;
dialog.noCancelOnOutsideClick = this.noCancelOnOutsideClick;
dialog.withBackdrop = this.withBackdrop;

dialog.addEventListener('iron-overlay-opened', this._dialogEventsHandler);
dialog.addEventListener('iron-overlay-closed', this._dialogEventsHandler);
Expand Down

0 comments on commit 0f34f75

Please sign in to comment.