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

Side by Side Diff: ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.js

Issue 2586113002: MD Settings: ignore modified key events in the profile avatar grid (Closed)
Patch Set: closure 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 'cr-profile-avatar-selector' is an element that displays 6 * @fileoverview 'cr-profile-avatar-selector' is an element that displays
7 * profile avatar icons and allows an avatar to be selected. 7 * profile avatar icons and allows an avatar to be selected.
8 */ 8 */
9 9
10 /** @typedef {{url: string, label: string}} */ 10 /** @typedef {{url: string, label: string}} */
11 var AvatarIcon; 11 var AvatarIcon;
12 12
13 Polymer({ 13 Polymer({
14 is: 'cr-profile-avatar-selector', 14 is: 'cr-profile-avatar-selector',
15 15
16 properties: { 16 properties: {
17 /** 17 /**
18 * The list of profile avatar URLs and labels.
19 * @type {!Array<!AvatarIcon>}
20 */
21 avatars: {
22 type: Array,
23 value: function() { return []; }
24 },
25
26 /**
18 * The currently selected profile avatar URL. May be a data URI. 27 * The currently selected profile avatar URL. May be a data URI.
19 * @type {string} 28 * @type {string}
20 */ 29 */
21 selectedAvatarUrl: { 30 selectedAvatarUrl: {
22 type: String, 31 type: String,
23 notify: true 32 notify: true
24 }, 33 },
25 34
26 /** 35 ignoreModifiedKeyEvents: {
27 * The list of profile avatar URLs and labels. 36 type: Boolean,
28 * @type {!Array<!AvatarIcon>} 37 value: false,
29 */ 38 },
30 avatars: {
31 type: Array,
32 value: function() { return []; }
33 }
34 }, 39 },
35 40
36 /** 41 /**
37 * @param {string} iconUrl 42 * @param {string} iconUrl
38 * @return {string} A CSS imageset for multiple scale factors. 43 * @return {string} A CSS imageset for multiple scale factors.
39 * @private 44 * @private
40 */ 45 */
41 getIconImageset_: function(iconUrl) { 46 getIconImageset_: function(iconUrl) {
42 return cr.icon.getImage(iconUrl); 47 return cr.icon.getImage(iconUrl);
43 }, 48 },
44 }); 49 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698