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

Unified Diff: ui/webui/resources/js/cr/ui/list_selection_model.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 4 years 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: ui/webui/resources/js/cr/ui/list_selection_model.js
diff --git a/ui/webui/resources/js/cr/ui/list_selection_model.js b/ui/webui/resources/js/cr/ui/list_selection_model.js
index 1609e75a84c9cfc39572623823d16e594145dea4..a51f2ac9bff80349ca28c4f63c1060df8141e24f 100644
--- a/ui/webui/resources/js/cr/ui/list_selection_model.js
+++ b/ui/webui/resources/js/cr/ui/list_selection_model.js
@@ -30,7 +30,9 @@ cr.define('cr.ui', function() {
* The number of items in the model.
* @type {number}
*/
- get length() { return this.length_; },
+ get length() {
+ return this.length_;
+ },
/**
* The selected indexes.
@@ -262,7 +264,9 @@ cr.define('cr.ui', function() {
* the user is moving using the arrow keys.
* @type {number}
*/
- get leadIndex() { return this.leadIndex_; },
+ get leadIndex() {
+ return this.leadIndex_;
+ },
set leadIndex(leadIndex) {
var oldValue = this.leadIndex_;
var newValue = this.adjustIndex_(leadIndex);
@@ -279,7 +283,9 @@ cr.define('cr.ui', function() {
* The anchorIndex is used with multiple selection.
* @type {number}
*/
- get anchorIndex() { return this.anchorIndex_; },
+ get anchorIndex() {
+ return this.anchorIndex_;
+ },
set anchorIndex(anchorIndex) {
var oldValue = this.anchorIndex_;
var newValue = this.adjustIndex_(anchorIndex);
@@ -311,7 +317,9 @@ cr.define('cr.ui', function() {
* Whether the selection model supports multiple selected items.
* @type {boolean}
*/
- get multiple() { return true; },
+ get multiple() {
+ return true;
+ },
/**
* Adjusts the selection after reordering of items in the table.
@@ -323,10 +331,13 @@ cr.define('cr.ui', function() {
var oldAnchorIndex = this.anchorIndex;
var oldSelectedItemsCount = this.selectedIndexes.length;
- this.selectedIndexes =
- this.selectedIndexes
- .map(function(oldIndex) { return permutation[oldIndex]; })
- .filter(function(index) { return index != -1; });
+ this.selectedIndexes = this.selectedIndexes
+ .map(function(oldIndex) {
+ return permutation[oldIndex];
+ })
+ .filter(function(index) {
+ return index != -1;
+ });
// Will be adjusted in endChange.
if (oldLeadIndex != -1)
@@ -348,7 +359,9 @@ cr.define('cr.ui', function() {
* Adjusts selection model length.
* @param {number} length New selection model length.
*/
- adjustLength: function(length) { this.length_ = length; }
+ adjustLength: function(length) {
+ this.length_ = length;
+ }
};
return {ListSelectionModel: ListSelectionModel};
« no previous file with comments | « ui/webui/resources/js/cr/ui/list_selection_controller.js ('k') | ui/webui/resources/js/cr/ui/list_single_selection_model.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698