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

Side by Side Diff: polymer_1.2.3/bower_components/iron-selector/iron-selection.html

Issue 1581713003: [third_party] add polymer 1.2.3 (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: 1.2.3 Created 4 years, 11 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 1
2 <!-- 2 <!--
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt 4 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
7 Code distributed by Google as part of the polymer project is also 7 Code distributed by Google as part of the polymer project is also
8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
9 --> 9 -->
10 10
(...skipping 14 matching lines...) Expand all
25 25
26 /** 26 /**
27 * Retrieves the selected item(s). 27 * Retrieves the selected item(s).
28 * 28 *
29 * @method get 29 * @method get
30 * @returns Returns the selected item(s). If the multi property is true, 30 * @returns Returns the selected item(s). If the multi property is true,
31 * `get` will return an array, otherwise it will return 31 * `get` will return an array, otherwise it will return
32 * the selected item or undefined if there is no selection. 32 * the selected item or undefined if there is no selection.
33 */ 33 */
34 get: function() { 34 get: function() {
35 return this.multi ? this.selection : this.selection[0]; 35 return this.multi ? this.selection.slice() : this.selection[0];
36 }, 36 },
37 37
38 /** 38 /**
39 * Clears all the selection except the ones indicated. 39 * Clears all the selection except the ones indicated.
40 * 40 *
41 * @method clear 41 * @method clear
42 * @param {Array} excludes items to be excluded. 42 * @param {Array} excludes items to be excluded.
43 */ 43 */
44 clear: function(excludes) { 44 clear: function(excludes) {
45 this.selection.slice().forEach(function(item) { 45 this.selection.slice().forEach(function(item) {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 * @method toggle 106 * @method toggle
107 * @param {*} item The item to toggle. 107 * @param {*} item The item to toggle.
108 */ 108 */
109 toggle: function(item) { 109 toggle: function(item) {
110 this.setItemSelected(item, !this.isSelected(item)); 110 this.setItemSelected(item, !this.isSelected(item));
111 } 111 }
112 112
113 }; 113 };
114 114
115 </script> 115 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698