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

Unified Diff: third_party/polymer/v1_0/components-chromium/paper-fab/paper-fab-extracted.js

Issue 1766433002: Roll Polymer to 1.3.1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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/v1_0/components-chromium/paper-fab/paper-fab-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/paper-fab/paper-fab-extracted.js b/third_party/polymer/v1_0/components-chromium/paper-fab/paper-fab-extracted.js
index e2e94d3db40807035c60657279bf66a9200bc2d6..2121d0d14e0da322c54e0352437cb5ff2489da9a 100644
--- a/third_party/polymer/v1_0/components-chromium/paper-fab/paper-fab-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/paper-fab/paper-fab-extracted.js
@@ -1,49 +1,54 @@
Polymer({
- is: 'paper-fab',
+ is: 'paper-fab',
- behaviors: [
- Polymer.PaperButtonBehavior
- ],
+ behaviors: [
+ Polymer.PaperButtonBehavior
+ ],
- properties: {
- /**
- * The URL of an image for the icon. If the src property is specified,
- * the icon property should not be.
- *
- * @attribute src
- * @type string
- * @default ''
- */
- src: {
- type: String,
- value: ''
+ properties: {
+ /**
+ * The URL of an image for the icon. If the src property is specified,
+ * the icon property should not be.
+ */
+ src: {
+ type: String,
+ value: ''
+ },
+
+ /**
+ * Specifies the icon name or index in the set of icons available in
+ * the icon's icon set. If the icon property is specified,
+ * the src property should not be.
+ */
+ icon: {
+ type: String,
+ value: ''
+ },
+
+ /**
+ * Set this to true to style this is a "mini" FAB.
+ */
+ mini: {
+ type: Boolean,
+ value: false,
+ reflectToAttribute: true
+ },
+
+ /**
+ * The label displayed in the badge. The label is centered, and ideally
+ * should have very few characters.
+ */
+ label: {
+ type: String,
+ observer: '_labelChanged'
+ }
},
- /**
- * Specifies the icon name or index in the set of icons available in
- * the icon's icon set. If the icon property is specified,
- * the src property should not be.
- *
- * @attribute icon
- * @type string
- * @default ''
- */
- icon: {
- type: String,
- value: ''
+ _labelChanged: function() {
+ this.setAttribute('aria-label', this.label);
},
- /**
- * Set this to true to style this is a "mini" FAB.
- *
- * @attribute mini
- * @type boolean
- * @default false
- */
- mini: {
- type: Boolean,
- value: false,
- reflectToAttribute: true
+ _computeIsIconFab: function(icon, src) {
+ return (icon.length > 0) || (src.length > 0);
}
- }
- });
+ });

Powered by Google App Engine
This is Rietveld 408576698