| OLD | NEW |
| 1 | |
| 2 | |
| 3 /** | 1 /** |
| 4 Polymer.IronFitBehavior fits an element in another element using `max-height` an
d `max-width`, and | 2 Polymer.IronFitBehavior fits an element in another element using `max-height` an
d `max-width`, and |
| 5 optionally centers it in the window or another element. | 3 optionally centers it in the window or another element. |
| 6 | 4 |
| 7 The element will only be sized and/or positioned if it has not already been size
d and/or positioned | 5 The element will only be sized and/or positioned if it has not already been size
d and/or positioned |
| 8 by CSS. | 6 by CSS. |
| 9 | 7 |
| 10 CSS properties | Action | 8 CSS properties | Action |
| 11 -----------------------------|------------------------------------------- | 9 -----------------------------|------------------------------------------- |
| 12 `position` set | Element is not centered horizontally or verticall
y | 10 `position` set | Element is not centered horizontally or verticall
y |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 top -= this._fitInfo.margin.top; | 230 top -= this._fitInfo.margin.top; |
| 233 this.style.top = top + 'px'; | 231 this.style.top = top + 'px'; |
| 234 } | 232 } |
| 235 if (!this._fitInfo.positionedBy.horizontally) { | 233 if (!this._fitInfo.positionedBy.horizontally) { |
| 236 var left = (this._fitWidth - this.offsetWidth) / 2 + this._fitLeft; | 234 var left = (this._fitWidth - this.offsetWidth) / 2 + this._fitLeft; |
| 237 left -= this._fitInfo.margin.left; | 235 left -= this._fitInfo.margin.left; |
| 238 this.style.left = left + 'px'; | 236 this.style.left = left + 'px'; |
| 239 } | 237 } |
| 240 } | 238 } |
| 241 | 239 |
| 242 }; | 240 }; |
| 243 | |
| OLD | NEW |