| OLD | NEW |
| 1 (function() { | 1 (function() { |
| 2 | 2 |
| 3 Polymer({ | 3 Polymer({ |
| 4 | 4 |
| 5 is: 'paper-dialog', | 5 is: 'paper-dialog', |
| 6 | 6 |
| 7 behaviors: [ | 7 behaviors: [ |
| 8 Polymer.PaperDialogBehavior, | 8 Polymer.PaperDialogBehavior, |
| 9 Polymer.NeonAnimationRunnerBehavior | 9 Polymer.NeonAnimationRunnerBehavior |
| 10 ], | 10 ], |
| 11 | 11 |
| 12 listeners: { | 12 listeners: { |
| 13 'neon-animation-finish': '_onNeonAnimationFinish' | 13 'neon-animation-finish': '_onNeonAnimationFinish' |
| 14 }, | 14 }, |
| 15 | 15 |
| 16 _renderOpened: function() { | 16 _renderOpened: function() { |
| 17 this.cancelAnimation(); | 17 this.cancelAnimation(); |
| 18 if (this.withBackdrop) { | |
| 19 this.backdropElement.open(); | |
| 20 } | |
| 21 this.playAnimation('entry'); | 18 this.playAnimation('entry'); |
| 22 }, | 19 }, |
| 23 | 20 |
| 24 _renderClosed: function() { | 21 _renderClosed: function() { |
| 25 this.cancelAnimation(); | 22 this.cancelAnimation(); |
| 26 if (this.withBackdrop) { | |
| 27 this.backdropElement.close(); | |
| 28 } | |
| 29 this.playAnimation('exit'); | 23 this.playAnimation('exit'); |
| 30 }, | 24 }, |
| 31 | 25 |
| 32 _onNeonAnimationFinish: function() { | 26 _onNeonAnimationFinish: function() { |
| 33 if (this.opened) { | 27 if (this.opened) { |
| 34 this._finishRenderOpened(); | 28 this._finishRenderOpened(); |
| 35 } else { | 29 } else { |
| 36 this._finishRenderClosed(); | 30 this._finishRenderClosed(); |
| 37 } | 31 } |
| 38 } | 32 } |
| 39 | 33 |
| 40 }); | 34 }); |
| 41 | 35 |
| 42 })(); | 36 })(); |
| OLD | NEW |