Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview 'settings-dialog' is a component for showing a modal dialog. | 6 * @fileoverview 'settings-dialog' is a component for showing a modal dialog. |
| 7 */ | 7 */ |
| 8 Polymer({ | 8 Polymer({ |
| 9 is: 'settings-dialog', | 9 is: 'settings-dialog', |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 | 23 |
| 24 /** @override */ | 24 /** @override */ |
| 25 withBackdrop: { | 25 withBackdrop: { |
| 26 type: Boolean, | 26 type: Boolean, |
| 27 value: true, | 27 value: true, |
| 28 }, | 28 }, |
| 29 }, | 29 }, |
| 30 | 30 |
| 31 behaviors: [Polymer.PaperDialogBehavior], | 31 behaviors: [Polymer.PaperDialogBehavior], |
| 32 | 32 |
| 33 /** @override */ | |
| 34 center: function() { | |
| 35 Polymer.IronFitBehavior.center.call(this); | |
| 36 | |
| 37 this.$$('.body-container').style.maxHeight = this.offsetHeight - | |
| 38 (this.$$('.title-container').offsetHeight + | |
| 39 this.$$('.button-container').offsetHeight + | |
| 40 this.$$('.footer-container').offsetHeight) + 'px'; | |
|
Dan Beam
2016/05/13 01:42:40
Do you hate this? (y/n) _
dpapad
2016/05/13 18:14:03
Well, it is a bit complicated at first sight. My m
dpapad
2016/05/13 18:20:33
FYI regarding the clipping issue, I had filed http
Dan Beam
2016/05/17 19:26:12
fixed
| |
| 41 }, | |
| 42 | |
| 33 /** @return {!PaperIconButtonElement} */ | 43 /** @return {!PaperIconButtonElement} */ |
| 34 getCloseButton: function() { | 44 getCloseButton: function() { |
| 35 return this.$.close; | 45 return this.$.close; |
| 36 }, | 46 }, |
| 37 }); | 47 }); |
| OLD | NEW |