Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 * @constructor | 6 * @constructor |
| 7 * @extends {HTMLSpanElement} | 7 * @extends {HTMLSpanElement} |
| 8 */ | 8 */ |
| 9 UI.Icon = class extends HTMLSpanElement { | 9 UI.Icon = class extends HTMLSpanElement { |
| 10 constructor() { | 10 constructor() { |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 | 23 |
| 24 var icon = /** @type {!UI.Icon} */ (new UI.Icon._constructor()); | 24 var icon = /** @type {!UI.Icon} */ (new UI.Icon._constructor()); |
| 25 if (className) | 25 if (className) |
| 26 icon.className = className; | 26 icon.className = className; |
| 27 if (iconType) | 27 if (iconType) |
| 28 icon.setIconType(iconType); | 28 icon.setIconType(iconType); |
| 29 return icon; | 29 return icon; |
| 30 } | 30 } |
| 31 | 31 |
| 32 /** | 32 /** |
| 33 * @param {!Array<!UI.Icon>} icons | |
| 34 * @return {!Element} | |
| 35 */ | |
| 36 static combine(icons) { | |
| 37 var container = createElementWithClass('span', 'icon-stack'); | |
| 38 for (var icon of icons) | |
| 39 container.appendChild(icon); | |
| 40 return container; | |
| 41 } | |
| 42 | |
| 43 /** | |
| 33 * @override | 44 * @override |
| 34 */ | 45 */ |
| 35 createdCallback() { | 46 createdCallback() { |
| 36 /** @type {?UI.Icon.Descriptor} */ | 47 /** @type {?UI.Icon.Descriptor} */ |
| 37 this._descriptor = null; | 48 this._descriptor = null; |
| 38 /** @type {string} */ | 49 /** @type {string} */ |
| 39 this._iconType = ''; | 50 this._iconType = ''; |
| 40 } | 51 } |
| 41 | 52 |
| 42 /** | 53 /** |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 'smallicon-orange-ball': {x: -160, y: 0, width: 10, height: 10, spritesheet: ' smallicons'}, | 112 'smallicon-orange-ball': {x: -160, y: 0, width: 10, height: 10, spritesheet: ' smallicons'}, |
| 102 'smallicon-thick-right-arrow': {x: -180, y: 0, width: 10, height: 10, spritesh eet: 'smallicons'}, | 113 'smallicon-thick-right-arrow': {x: -180, y: 0, width: 10, height: 10, spritesh eet: 'smallicons'}, |
| 103 'smallicon-thick-left-arrow': | 114 'smallicon-thick-left-arrow': |
| 104 {x: -180, y: 0, width: 10, height: 10, spritesheet: 'smallicons', transfor m: 'rotate(180deg)'}, | 115 {x: -180, y: 0, width: 10, height: 10, spritesheet: 'smallicons', transfor m: 'rotate(180deg)'}, |
| 105 'smallicon-user-command': {x: 0, y: -20, width: 10, height: 10, spritesheet: ' smallicons'}, | 116 'smallicon-user-command': {x: 0, y: -20, width: 10, height: 10, spritesheet: ' smallicons'}, |
| 106 'smallicon-text-prompt': {x: -20, y: -20, width: 10, height: 10, spritesheet: 'smallicons'}, | 117 'smallicon-text-prompt': {x: -20, y: -20, width: 10, height: 10, spritesheet: 'smallicons'}, |
| 107 'smallicon-command-result': {x: -40, y: -20, width: 10, height: 10, spriteshee t: 'smallicons'}, | 118 'smallicon-command-result': {x: -40, y: -20, width: 10, height: 10, spriteshee t: 'smallicons'}, |
| 108 'smallicon-shadow': {x: -60, y: -20, width: 10, height: 10, spritesheet: 'smal licons', isMask: true}, | 119 'smallicon-shadow': {x: -60, y: -20, width: 10, height: 10, spritesheet: 'smal licons', isMask: true}, |
| 109 'smallicon-bezier': {x: -80, y: -20, width: 10, height: 10, spritesheet: 'smal licons', isMask: true}, | 120 'smallicon-bezier': {x: -80, y: -20, width: 10, height: 10, spritesheet: 'smal licons', isMask: true}, |
| 110 'smallicon-dropdown-arrow': {x: -18, y: -96, width: 12, height: 12, spriteshee t: 'largeicons', isMask: true}, | 121 'smallicon-dropdown-arrow': {x: -18, y: -96, width: 12, height: 12, spriteshee t: 'largeicons', isMask: true}, |
| 111 'smallicon-checkmark': {x: -100, y: -20, width: 10, height: 10, spritesheet: ' smallicons', isMask: true}, | |
| 112 'smallicon-green-checkmark': {x: -120, y: -20, width: 10, height: 10, spritesh eet: 'smallicons'}, | |
| 113 'smallicon-triangle-right': {x: -4, y: -98, width: 10, height: 8, spritesheet: 'largeicons', isMask: true}, | 122 'smallicon-triangle-right': {x: -4, y: -98, width: 10, height: 8, spritesheet: 'largeicons', isMask: true}, |
| 114 'smallicon-triangle-bottom': {x: -20, y: -98, width: 10, height: 8, spriteshee t: 'largeicons', isMask: true}, | 123 'smallicon-triangle-bottom': {x: -20, y: -98, width: 10, height: 8, spriteshee t: 'largeicons', isMask: true}, |
| 115 'smallicon-arrow-in-circle': {x: -10, y: -127, width: 11, height: 11, spritesh eet: 'largeicons', isMask: true}, | 124 'smallicon-arrow-in-circle': {x: -10, y: -127, width: 11, height: 11, spritesh eet: 'largeicons', isMask: true}, |
| 116 'smallicon-cross': {x: -177, y: -98, width: 10, height: 10, spritesheet: 'larg eicons'}, | 125 'smallicon-cross': {x: -177, y: -98, width: 10, height: 10, spritesheet: 'larg eicons'}, |
| 117 'smallicon-inline-breakpoint': {x: -140, y: -20, width: 10, height: 10, sprite sheet: 'smallicons'}, | 126 'smallicon-inline-breakpoint': {x: -140, y: -20, width: 10, height: 10, sprite sheet: 'smallicons'}, |
| 118 'smallicon-inline-breakpoint-conditional': {x: -160, y: -20, width: 10, height : 10, spritesheet: 'smallicons'}, | 127 'smallicon-inline-breakpoint-conditional': {x: -160, y: -20, width: 10, height : 10, spritesheet: 'smallicons'}, |
| 128 'smallicon-file': {x: -64, y: -24, width: 10, height: 14, spritesheet: 'largei cons'}, | |
| 129 'smallicon-file-sync': {x: -74, y: -24, width: 12, height: 14, spritesheet: 'l argeicons'}, | |
| 130 'smallicon-badge-sync': {x: -84, y: -24, width: 12, height: 14, spritesheet: ' largeicons'}, | |
| 119 | 131 |
| 120 'largeicon-longclick-triangle': {x: -290, y: -46, width: 28, height: 24, sprit esheet: 'largeicons', isMask: true}, | 132 'largeicon-longclick-triangle': {x: -290, y: -46, width: 28, height: 24, sprit esheet: 'largeicons', isMask: true}, |
| 121 'largeicon-menu': {x: -192, y: -24, width: 28, height: 24, spritesheet: 'large icons', isMask: true}, | 133 'largeicon-menu': {x: -192, y: -24, width: 28, height: 24, spritesheet: 'large icons', isMask: true}, |
| 122 'largeicon-delete': {x: -128, y: -0, width: 28, height: 24, spritesheet: 'larg eicons', isMask: true}, | 134 'largeicon-delete': {x: -128, y: -0, width: 28, height: 24, spritesheet: 'larg eicons', isMask: true}, |
| 123 'largeicon-node-search': {x: -320, y: -120, width: 28, height: 24, spritesheet : 'largeicons', isMask: true}, | 135 'largeicon-node-search': {x: -320, y: -120, width: 28, height: 24, spritesheet : 'largeicons', isMask: true}, |
| 124 'largeicon-add': {x: -224, y: -120, width: 28, height: 24, spritesheet: 'large icons', isMask: true}, | 136 'largeicon-add': {x: -224, y: -120, width: 28, height: 24, spritesheet: 'large icons', isMask: true}, |
| 125 'largeicon-clear': {x: -64, y: 0, width: 28, height: 24, spritesheet: 'largeic ons', isMask: true}, | 137 'largeicon-clear': {x: -64, y: 0, width: 28, height: 24, spritesheet: 'largeic ons', isMask: true}, |
| 126 'largeicon-rotate-screen': {x: -192, y: -144, width: 28, height: 24, spriteshe et: 'largeicons', isMask: true}, | 138 'largeicon-rotate-screen': {x: -192, y: -144, width: 28, height: 24, spriteshe et: 'largeicons', isMask: true}, |
| 127 'largeicon-phone': {x: -320, y: -96, width: 28, height: 24, spritesheet: 'larg eicons', isMask: true}, | 139 'largeicon-phone': {x: -320, y: -96, width: 28, height: 24, spritesheet: 'larg eicons', isMask: true}, |
| 128 'largeicon-block': {x: -32, y: -144, width: 28, height: 24, spritesheet: 'larg eicons', isMask: true}, | 140 'largeicon-block': {x: -32, y: -144, width: 28, height: 24, spritesheet: 'larg eicons', isMask: true}, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 201 'largeicon-hide-bottom-sidebar': { | 213 'largeicon-hide-bottom-sidebar': { |
| 202 x: -192, | 214 x: -192, |
| 203 y: -72, | 215 y: -72, |
| 204 width: 28, | 216 width: 28, |
| 205 height: 24, | 217 height: 24, |
| 206 spritesheet: 'largeicons', | 218 spritesheet: 'largeicons', |
| 207 isMask: true, | 219 isMask: true, |
| 208 transform: 'translate(4px, 1px) rotate(-90deg)' | 220 transform: 'translate(4px, 1px) rotate(-90deg)' |
| 209 }, | 221 }, |
| 210 'largeicon-navigator-file': {x: -224, y: -72, width: 32, height: 24, spriteshe et: 'largeicons', isMask: true}, | 222 'largeicon-navigator-file': {x: -224, y: -72, width: 32, height: 24, spriteshe et: 'largeicons', isMask: true}, |
| 223 'largeicon-navigator-file-synced': {x: -160, y: -24, width: 32, height: 24, sp ritesheet: 'largeicons', isMask: true}, | |
| 224 'badge-navigator-file-synced': {x: -288, y: -72, width: 32, height: 24, sprite sheet: 'largeicons'}, | |
| 225 'badge-navigator-file-sync-error': {x: -320, y: -72, width: 32, height: 24, sp ritesheet: 'largeicons'}, | |
|
dgozman
2016/12/21 02:44:40
Remove.
| |
| 211 'largeicon-navigator-folder': {x: -64, y: -120, width: 32, height: 24, sprites heet: 'largeicons', isMask: true}, | 226 'largeicon-navigator-folder': {x: -64, y: -120, width: 32, height: 24, sprites heet: 'largeicons', isMask: true}, |
| 212 'largeicon-navigator-domain': {x: -160, y: -144, width: 32, height: 24, sprite sheet: 'largeicons', isMask: true}, | 227 'largeicon-navigator-domain': {x: -160, y: -144, width: 32, height: 24, sprite sheet: 'largeicons', isMask: true}, |
| 213 'largeicon-navigator-frame': {x: -256, y: -144, width: 32, height: 24, sprites heet: 'largeicons', isMask: true}, | 228 'largeicon-navigator-frame': {x: -256, y: -144, width: 32, height: 24, sprites heet: 'largeicons', isMask: true}, |
| 214 'largeicon-navigator-worker': {x: -320, y: -144, width: 32, height: 24, sprite sheet: 'largeicons', isMask: true}, | 229 'largeicon-navigator-worker': {x: -320, y: -144, width: 32, height: 24, sprite sheet: 'largeicons', isMask: true}, |
| 215 'largeicon-navigator-snippet': {x: -224, y: -96, width: 32, height: 24, sprite sheet: 'largeicons', isMask: true}, | 230 'largeicon-navigator-snippet': {x: -224, y: -96, width: 32, height: 24, sprite sheet: 'largeicons', isMask: true}, |
| 216 }; | 231 }; |
| OLD | NEW |