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

Unified Diff: chrome/browser/resources/shared/js/cr/ui/list_selection_model.js

Issue 9705015: Making the selectedIndex property setters of ListSelectionModel and ListSingleSelectionModel behave… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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: chrome/browser/resources/shared/js/cr/ui/list_selection_model.js
diff --git a/chrome/browser/resources/shared/js/cr/ui/list_selection_model.js b/chrome/browser/resources/shared/js/cr/ui/list_selection_model.js
index 740b73b2a6f0a371c3d1ec70f6d5254ef7d97315..e485d8bcccf53f90988d45b38b7d293e268ec8a9 100644
--- a/chrome/browser/resources/shared/js/cr/ui/list_selection_model.js
+++ b/chrome/browser/resources/shared/js/cr/ui/list_selection_model.js
@@ -33,7 +33,9 @@ cr.define('cr.ui', function() {
},
/**
- * @type {!Array} The selected indexes.
+ * The selected indexes.
+ * Setter also changes lead and anchor indexes if value list is nonempty.
+ * @type {!Array}
*/
get selectedIndexes() {
return Object.keys(this.selectedIndexes_).map(Number);
@@ -70,6 +72,7 @@ cr.define('cr.ui', function() {
/**
* Convenience getter which returns the first selected index.
+ * Setter also changes lead and anchor indexes if value is nonnegative.
* @type {number}
*/
get selectedIndex() {

Powered by Google App Engine
This is Rietveld 408576698