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

Side by Side Diff: ui/webui/resources/js/cr/ui/table/table_column.js

Issue 2603443002: Clang format JS: Disallow single line functions, conditionals, loops, and switch statements (Closed)
Patch Set: update c/b/r/ as well Created 3 years, 12 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview This is a table column representation 6 * @fileoverview This is a table column representation
7 */ 7 */
8 8
9 cr.define('cr.ui.table', function() { 9 cr.define('cr.ui.table', function() {
10 /** @const */ var EventTarget = cr.EventTarget; 10 /** @const */ var EventTarget = cr.EventTarget;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 * @return {Text} Rendered text node. 68 * @return {Text} Rendered text node.
69 */ 69 */
70 headerRenderFunction_: function(table) { 70 headerRenderFunction_: function(table) {
71 return table.ownerDocument.createTextNode(this.name); 71 return table.ownerDocument.createTextNode(this.name);
72 }, 72 },
73 73
74 /** 74 /**
75 * The width of the column. Hidden columns have zero width. 75 * The width of the column. Hidden columns have zero width.
76 * @type {number} 76 * @type {number}
77 */ 77 */
78 get width() { return this.visible_ ? this.width_ : 0; }, 78 get width() {
79 return this.visible_ ? this.width_ : 0;
80 },
79 81
80 /** 82 /**
81 * The width of the column, disregarding visibility. For hidden columns, 83 * The width of the column, disregarding visibility. For hidden columns,
82 * this would be the width of the column if it were to be made visible. 84 * this would be the width of the column if it were to be made visible.
83 * @type {number} 85 * @type {number}
84 */ 86 */
85 get absoluteWidth() { return this.width_; }, 87 get absoluteWidth() {
88 return this.width_;
89 },
86 }; 90 };
87 91
88 /** 92 /**
89 * The column id. 93 * The column id.
90 * @type {string} 94 * @type {string}
91 */ 95 */
92 cr.defineProperty(TableColumn, 'id'); 96 cr.defineProperty(TableColumn, 'id');
93 97
94 /** 98 /**
95 * The column name 99 * The column name
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 cr.defineProperty(TableColumn, 'headerRenderFunction'); 132 cr.defineProperty(TableColumn, 'headerRenderFunction');
129 133
130 /** 134 /**
131 * Default sorting order for the column ('asc' or 'desc'). 135 * Default sorting order for the column ('asc' or 'desc').
132 * @type {string} 136 * @type {string}
133 */ 137 */
134 cr.defineProperty(TableColumn, 'defaultOrder'); 138 cr.defineProperty(TableColumn, 'defaultOrder');
135 139
136 return {TableColumn: TableColumn}; 140 return {TableColumn: TableColumn};
137 }); 141 });
OLDNEW
« no previous file with comments | « ui/webui/resources/js/cr/ui/table.js ('k') | ui/webui/resources/js/cr/ui/table/table_column_model.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698