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