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

Side by Side Diff: third_party/polymer/components-chromium/core-toolbar/core-toolbar-extracted.js

Issue 1215543002: Remove Polymer 0.5. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test Created 5 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
(Empty)
1
2
3 (function() {
4
5 Polymer('core-toolbar', {
6
7 /**
8 * Controls how the items are aligned horizontally.
9 * Options are `start`, `center`, `end`, `between` and `around`.
10 *
11 * @attribute justify
12 * @type string
13 * @default ''
14 */
15 justify: '',
16
17 /**
18 * Controls how the items are aligned horizontally when they are placed
19 * in the middle.
20 * Options are `start`, `center`, `end`, `between` and `around`.
21 *
22 * @attribute middleJustify
23 * @type string
24 * @default ''
25 */
26 middleJustify: '',
27
28 /**
29 * Controls how the items are aligned horizontally when they are placed
30 * at the bottom.
31 * Options are `start`, `center`, `end`, `between` and `around`.
32 *
33 * @attribute bottomJustify
34 * @type string
35 * @default ''
36 */
37 bottomJustify: '',
38
39 justifyChanged: function(old) {
40 this.updateBarJustify(this.$.topBar, this.justify, old);
41 },
42
43 middleJustifyChanged: function(old) {
44 this.updateBarJustify(this.$.middleBar, this.middleJustify, old);
45 },
46
47 bottomJustifyChanged: function(old) {
48 this.updateBarJustify(this.$.bottomBar, this.bottomJustify, old);
49 },
50
51 updateBarJustify: function(bar, justify, old) {
52 if (old) {
53 bar.removeAttribute(this.toLayoutAttrName(old));
54 }
55 if (justify) {
56 bar.setAttribute(this.toLayoutAttrName(justify), '');
57 }
58 },
59
60 toLayoutAttrName: function(value) {
61 return value === 'between' ? 'justified' : value + '-justified';
62 }
63
64 });
65
66 })();
67
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698