Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: third_party/polymer/v1_0/components-chromium/iron-fit-behavior/iron-fit-behavior-extracted.js

Issue 1287713002: [MD settings] merge polymer 1.0.11; hack for settings checkbox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698