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

Unified Diff: third_party/polymer/v0_8/components-chromium/paper-toolbar/paper-toolbar-extracted.js

Issue 1140583003: Material PDF: Add required Polymer 0.8 elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 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/v0_8/components-chromium/paper-toolbar/paper-toolbar-extracted.js
diff --git a/third_party/polymer/v0_8/components-chromium/paper-toolbar/paper-toolbar-extracted.js b/third_party/polymer/v0_8/components-chromium/paper-toolbar/paper-toolbar-extracted.js
new file mode 100644
index 0000000000000000000000000000000000000000..55efea9d8a1673ee4399262b2fb693ec340fb26c
--- /dev/null
+++ b/third_party/polymer/v0_8/components-chromium/paper-toolbar/paper-toolbar-extracted.js
@@ -0,0 +1,93 @@
+
+
+ (function() {
+
+ 'use strict';
+
+ function classNames(obj) {
+ var classNames = [];
+ for (var key in obj) {
+ if (obj.hasOwnProperty(key) && obj[key]) {
+ classNames.push(key);
+ }
+ }
+
+ return classNames.join(' ');
+ }
+
+ Polymer({
+
+ is: 'paper-toolbar',
+
+ enableCustomStyleProperties: true,
+
+ properties: {
+
+ /**
+ * Controls how the items are aligned horizontally when they are placed
+ * at the bottom.
+ * Options are `start`, `center`, `end`, `justified` and `around`.
+ *
+ * @attribute bottomJustify
+ * @type string
+ * @default ''
+ */
+ bottomJustify: {
+ type: String,
+ value: ''
+ },
+
+ /**
+ * Controls how the items are aligned horizontally.
+ * Options are `start`, `center`, `end`, `justified` and `around`.
+ *
+ * @attribute justify
+ * @type string
+ * @default ''
+ */
+ justify: {
+ type: String,
+ value: ''
+ },
+
+ /**
+ * Controls how the items are aligned horizontally when they are placed
+ * in the middle.
+ * Options are `start`, `center`, `end`, `justified` and `around`.
+ *
+ * @attribute middleJustify
+ * @type string
+ * @default ''
+ */
+ middleJustify: {
+ type: String,
+ value: ''
+ }
+
+ },
+
+ _computeBarClassName: function(barJustify) {
+ var classObj = {
+ center: true,
+ horizontal: true,
+ layout: true,
+ 'toolbar-tools': true
+ };
+
+ // If a blank string or any falsy value is given, no other class name is
+ // added.
+ if (barJustify) {
+ var justifyClassName = (barJustify === 'justified') ?
+ barJustify :
+ barJustify + '-justified';
+
+ classObj[justifyClassName] = true;
+ }
+
+ return classNames(classObj);
+ }
+
+ });
+
+ }());
+

Powered by Google App Engine
This is Rietveld 408576698