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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 * @param {string} colorText | 222 * @param {string} colorText |
223 * @param {number=} animationDelay | 223 * @param {number=} animationDelay |
224 * @return {!Element} | 224 * @return {!Element} |
225 */ | 225 */ |
226 _createPaletteColor: function(colorText, animationDelay) | 226 _createPaletteColor: function(colorText, animationDelay) |
227 { | 227 { |
228 var element = createElementWithClass("div", "spectrum-palette-color"); | 228 var element = createElementWithClass("div", "spectrum-palette-color"); |
229 element.style.background = String.sprintf("linear-gradient(%s, %s), url(
Images/checker.png)", colorText, colorText); | 229 element.style.background = String.sprintf("linear-gradient(%s, %s), url(
Images/checker.png)", colorText, colorText); |
230 if (animationDelay) | 230 if (animationDelay) |
231 element.animate([{ opacity: 0 }, { opacity: 1 }], { duration: 100, d
elay: animationDelay, fill: "backwards" }); | 231 element.animate([{ opacity: 0 }, { opacity: 1 }], { duration: 100, d
elay: animationDelay, fill: "backwards" }); |
232 element.title = colorText; | 232 var tooltipOptions = {}; |
| 233 tooltipOptions[WebInspector.Tooltip.Options.VerticalAlignmentTop] = WebI
nspector.Tooltip.Options.VerticalAlignmentTop; |
| 234 WebInspector.Tooltip.install(element, colorText, "", tooltipOptions); |
233 return element; | 235 return element; |
234 }, | 236 }, |
235 | 237 |
236 /** | 238 /** |
237 * @param {!WebInspector.Spectrum.Palette} palette | 239 * @param {!WebInspector.Spectrum.Palette} palette |
238 * @param {boolean} animate | 240 * @param {boolean} animate |
239 * @param {!Event=} event | 241 * @param {!Event=} event |
240 */ | 242 */ |
241 _showPalette: function(palette, animate, event) | 243 _showPalette: function(palette, animate, event) |
242 { | 244 { |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 "#8BC34A", | 907 "#8BC34A", |
906 "#CDDC39", | 908 "#CDDC39", |
907 "#FFEB3B", | 909 "#FFEB3B", |
908 "#FFC107", | 910 "#FFC107", |
909 "#FF9800", | 911 "#FF9800", |
910 "#FF5722", | 912 "#FF5722", |
911 "#795548", | 913 "#795548", |
912 "#9E9E9E", | 914 "#9E9E9E", |
913 "#607D8B" | 915 "#607D8B" |
914 ]}; | 916 ]}; |
OLD | NEW |