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

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

Issue 2089563002: [Polymer] update polymer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: polymer update Created 4 years, 5 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 /** 1 /**
2 `Polymer.IronFitBehavior` fits an element in another element using `max-height` and `max-width`, and 2 `Polymer.IronFitBehavior` fits an element in another element using `max-height` and `max-width`, and
3 optionally centers it in the window or another element. 3 optionally centers it in the window or another element.
4 4
5 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
6 by CSS. 6 by CSS.
7 7
8 CSS properties | Action 8 CSS properties | Action
9 -----------------------------|------------------------------------------- 9 -----------------------------|-------------------------------------------
10 `position` set | Element is not centered horizontally or verticall y 10 `position` set | Element is not centered horizontally or verticall y
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 */ 223 */
224 fit: function() { 224 fit: function() {
225 this._discoverInfo(); 225 this._discoverInfo();
226 this.position(); 226 this.position();
227 this.constrain(); 227 this.constrain();
228 this.center(); 228 this.center();
229 }, 229 },
230 230
231 /** 231 /**
232 * Memoize information needed to position and size the target element. 232 * Memoize information needed to position and size the target element.
233 * @suppress {deprecated}
233 */ 234 */
234 _discoverInfo: function() { 235 _discoverInfo: function() {
235 if (this._fitInfo) { 236 if (this._fitInfo) {
236 return; 237 return;
237 } 238 }
238 var target = window.getComputedStyle(this); 239 var target = window.getComputedStyle(this);
239 var sizer = window.getComputedStyle(this.sizingTarget); 240 var sizer = window.getComputedStyle(this.sizingTarget);
240 241
241 this._fitInfo = { 242 this._fitInfo = {
242 inlineStyle: { 243 inlineStyle: {
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 // ones overlapping vertically. 571 // ones overlapping vertically.
571 if (position.croppedArea === 0 && alignOk) { 572 if (position.croppedArea === 0 && alignOk) {
572 break; 573 break;
573 } 574 }
574 } 575 }
575 576
576 return position; 577 return position;
577 } 578 }
578 579
579 }; 580 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698