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

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

Issue 1150173003: Fix some JS style nits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 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 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 implements a table header. 6 * @fileoverview This implements a table header.
7 */ 7 */
8 8
9 cr.define('cr.ui.table', function() { 9 cr.define('cr.ui.table', function() {
10 /** @const */ var TableSplitter = cr.ui.TableSplitter; 10 /** @const */ var TableSplitter = cr.ui.TableSplitter;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 splitter.hidden = !cm.isVisible(i); 127 splitter.hidden = !cm.isVisible(i);
128 128
129 this.headerInner_.appendChild(splitter); 129 this.headerInner_.appendChild(splitter);
130 splitters.push(splitter); 130 splitters.push(splitter);
131 } 131 }
132 this.placeSplitters_(splitters); 132 this.placeSplitters_(splitters);
133 }, 133 },
134 134
135 /** 135 /**
136 * Place splitters to right positions. 136 * Place splitters to right positions.
137 * @param {Array.<HTMLElement>|NodeList} splitters Array of splitters. 137 * @param {Array<HTMLElement>|NodeList} splitters Array of splitters.
138 */ 138 */
139 placeSplitters_: function(splitters) { 139 placeSplitters_: function(splitters) {
140 var cm = this.table_.columnModel; 140 var cm = this.table_.columnModel;
141 var place = 0; 141 var place = 0;
142 for (var i = 0; i < cm.size; i++) { 142 for (var i = 0; i < cm.size; i++) {
143 // Don't account for the widths of hidden columns. 143 // Don't account for the widths of hidden columns.
144 if (splitters[i].hidden) 144 if (splitters[i].hidden)
145 continue; 145 continue;
146 place += cm.getWidth(i); 146 place += cm.getWidth(i);
147 splitters[i].style.webkitMarginStart = place + 'px'; 147 splitters[i].style.webkitMarginStart = place + 'px';
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 /** 258 /**
259 * Rectangular area around the splitters sensitive to touch events 259 * Rectangular area around the splitters sensitive to touch events
260 * (in pixels). 260 * (in pixels).
261 */ 261 */
262 TableHeader.TOUCH_DRAG_AREA_WIDTH = 30; 262 TableHeader.TOUCH_DRAG_AREA_WIDTH = 30;
263 263
264 return { 264 return {
265 TableHeader: TableHeader 265 TableHeader: TableHeader
266 }; 266 };
267 }); 267 });
OLDNEW
« no previous file with comments | « ui/webui/resources/js/cr/ui/page_manager/page_manager.js ('k') | ui/webui/resources/js/cr/ui/touch_handler.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698