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

Unified Diff: third_party/polymer/components/paper-toast/paper-toast.html

Issue 2113853002: Run bower update (Closed) Base URL: https://github.com/catapult-project/catapult@polymer10-migration
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/polymer/components/paper-toast/paper-toast.html
diff --git a/third_party/polymer/components/paper-toast/paper-toast.html b/third_party/polymer/components/paper-toast/paper-toast.html
index 3b4d3696b5b58347ec3c515d5b38441e36d9c9b1..46260dab49703772274561893d2f85074f8d9005 100644
--- a/third_party/polymer/components/paper-toast/paper-toast.html
+++ b/third_party/polymer/components/paper-toast/paper-toast.html
@@ -77,8 +77,6 @@ In order to apply the `Roboto` font to this element, make sure you've imported `
box-sizing: border-box;
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
border-radius: 2px;
- left: 0;
- bottom: 0;
margin: 12px;
font-size: 14px;
cursor: default;
@@ -126,6 +124,36 @@ In order to apply the `Roboto` font to this element, make sure you've imported `
properties: {
/**
+ * The element to fit `this` into.
+ * Overridden from `Polymer.IronFitBehavior`.
+ */
+ fitInto: {
+ type: Object,
+ value: window,
+ observer: '_onFitIntoChanged'
+ },
+
+ /**
+ * The orientation against which to align the dropdown content
+ * horizontally relative to `positionTarget`.
+ * Overridden from `Polymer.IronFitBehavior`.
+ */
+ horizontalAlign: {
+ type: String,
+ value: 'left'
+ },
+
+ /**
+ * The orientation against which to align the dropdown content
+ * vertically relative to `positionTarget`.
+ * Overridden from `Polymer.IronFitBehavior`.
+ */
+ verticalAlign: {
+ type: String,
+ value: 'bottom'
+ },
+
+ /**
* The duration in milliseconds to show the toast.
* Set to `0`, a negative number, or `Infinity`, to disable the
* toast auto-closing.
@@ -173,7 +201,7 @@ In order to apply the `Roboto` font to this element, make sure you've imported `
* @deprecated
*/
get visible() {
- console.warn('`visible` is deprecated, use `opened` instead');
+ Polymer.Base._warn('`visible` is deprecated, use `opened` instead');
return this.opened;
},
@@ -201,11 +229,11 @@ In order to apply the `Roboto` font to this element, make sure you've imported `
}
for (var property in properties) {
if (property.indexOf('_') === 0) {
- console.warn('The property "' + property + '" is private and was not set.');
+ Polymer.Base._warn('The property "' + property + '" is private and was not set.');
} else if (property in this) {
this[property] = properties[property];
} else {
- console.warn('The property "' + property + '" is not valid.');
+ Polymer.Base._warn('The property "' + property + '" is not valid.');
}
}
this.open();
@@ -219,20 +247,6 @@ In order to apply the `Roboto` font to this element, make sure you've imported `
},
/**
- * Overridden from `IronFitBehavior`.
- * Positions the toast at the bottom left of fitInto.
- */
- center: function () {
- if (this.fitInto === window) {
- this.style.bottom = this.style.left = '';
- } else {
- var rect = this.fitInto.getBoundingClientRect();
- this.style.left = rect.left + 'px';
- this.style.bottom = (window.innerHeight - rect.bottom) + 'px';
- }
- },
-
- /**
* Called on transitions of the toast, indicating a finished animation
* @private
*/
@@ -291,16 +305,10 @@ In order to apply the `Roboto` font to this element, make sure you've imported `
},
/**
- * Overridden from `IronOverlayBehavior`.
- * iron-fit-behavior will set the inline style position: static, which
- * causes the toast to be rendered incorrectly when opened by default.
+ * @private
*/
- _onIronResize: function() {
- Polymer.IronOverlayBehaviorImpl._onIronResize.apply(this, arguments);
- if (this.opened) {
- // Make sure there is no inline style for position.
- this.style.position = '';
- }
+ _onFitIntoChanged: function(fitInto) {
+ this.positionTarget = fitInto;
}
/**
« no previous file with comments | « third_party/polymer/components/paper-toast/paper-toast.css ('k') | third_party/polymer/components/paper-toast/test/basic.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698