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

Side by Side Diff: Source/devtools/front_end/elements/Spectrum.js

Issue 1318903007: Devtools UI: Fix tooltip issues (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Color picker tooltip placed above Created 5 years, 3 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 * 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
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
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 ]};
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698