update components

This commit is contained in:
Luke Pulverenti 2016-03-19 15:39:52 -04:00
parent ffd37618d5
commit ccf45da5f9
6 changed files with 274 additions and 214 deletions

View file

@ -40,12 +40,14 @@ Custom property | Description | Default
background-color: var(--iron-overlay-backdrop-background-color, #000);
opacity: 0;
transition: opacity 0.2s;
pointer-events: none;
@apply(--iron-overlay-backdrop);
}
:host([opened]) {
opacity: var(--iron-overlay-backdrop-opacity, 0.6);
pointer-events: auto;
@apply(--iron-overlay-backdrop-opened);
}
@ -93,8 +95,6 @@ Custom property | Description | Default
* Appends the backdrop to document body and sets its `z-index` to be below the latest overlay.
*/
prepare: function() {
// Always update z-index
this.style.zIndex = this._manager.backdropZ();
if (!this.parentNode) {
Polymer.dom(document.body).appendChild(this);
}
@ -114,8 +114,6 @@ Custom property | Description | Default
* Hides the backdrop if needed.
*/
close: function() {
// Always update z-index
this.style.zIndex = this._manager.backdropZ();
// close only if no element with backdrop is left
if (this._manager.getBackdrops().length === 0) {
// Read style before setting opened.