| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Brian Grinstead All rights reserved. | 2 * Copyright (C) 2011 Brian Grinstead All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 shadow.style.background = palette.colors[i]; | 269 shadow.style.background = palette.colors[i]; |
| 270 shadow = colorElement.createChild('div', 'spectrum-palette-color spectru
m-palette-color-shadow'); | 270 shadow = colorElement.createChild('div', 'spectrum-palette-color spectru
m-palette-color-shadow'); |
| 271 shadow.style.background = palette.colors[i]; | 271 shadow.style.background = palette.colors[i]; |
| 272 colorElement.title = Common.UIString(palette.colors[i] + '. Long-click t
o show alternate shades.'); | 272 colorElement.title = Common.UIString(palette.colors[i] + '. Long-click t
o show alternate shades.'); |
| 273 new UI.LongClickController(colorElement, this._showLightnessShades.bind(
this, colorElement, palette.colors[i])); | 273 new UI.LongClickController(colorElement, this._showLightnessShades.bind(
this, colorElement, palette.colors[i])); |
| 274 } | 274 } |
| 275 this._paletteContainer.appendChild(colorElement); | 275 this._paletteContainer.appendChild(colorElement); |
| 276 } | 276 } |
| 277 this._paletteContainerMutable = palette.mutable; | 277 this._paletteContainerMutable = palette.mutable; |
| 278 | 278 |
| 279 var numItems = palette.colors.length; | |
| 280 if (palette.mutable) | |
| 281 numItems++; | |
| 282 if (palette.mutable) { | 279 if (palette.mutable) { |
| 283 this._paletteContainer.appendChild(this._addColorToolbar.element); | 280 this._paletteContainer.appendChild(this._addColorToolbar.element); |
| 284 this._paletteContainer.appendChild(this._deleteIconToolbar.element); | 281 this._paletteContainer.appendChild(this._deleteIconToolbar.element); |
| 285 } else { | 282 } else { |
| 286 this._addColorToolbar.element.remove(); | 283 this._addColorToolbar.element.remove(); |
| 287 this._deleteIconToolbar.element.remove(); | 284 this._deleteIconToolbar.element.remove(); |
| 288 } | 285 } |
| 289 | 286 |
| 290 this._togglePalettePanel(false); | 287 this._togglePalettePanel(false); |
| 291 this._focus(); | 288 this._focus(); |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1048 '#607D8B': | 1045 '#607D8B': |
| 1049 ['#ECEFF1', '#CFD8DC', '#B0BEC5', '#90A4AE', '#78909C', '#607D8B', '#546E7
A', '#455A64', '#37474F', '#263238'] | 1046 ['#ECEFF1', '#CFD8DC', '#B0BEC5', '#90A4AE', '#78909C', '#607D8B', '#546E7
A', '#455A64', '#37474F', '#263238'] |
| 1050 }; | 1047 }; |
| 1051 | 1048 |
| 1052 Components.Spectrum.MaterialPalette = { | 1049 Components.Spectrum.MaterialPalette = { |
| 1053 title: 'Material', | 1050 title: 'Material', |
| 1054 mutable: false, | 1051 mutable: false, |
| 1055 matchUserFormat: true, | 1052 matchUserFormat: true, |
| 1056 colors: Object.keys(Components.Spectrum.MaterialPaletteShades) | 1053 colors: Object.keys(Components.Spectrum.MaterialPaletteShades) |
| 1057 }; | 1054 }; |
| OLD | NEW |