4905867d4df06d0c4cfe5769998334eaed96d6d6 braney Thu Apr 9 16:02:15 2026 -0700 Revert "Fix color picker and quickLift issues from code review, refs #37329" This reverts commit 0c4b26c76ee09cadbe1a444016f2c41df33906f9. diff --git src/hg/js/hui.js src/hg/js/hui.js index cc6091710b4..f129c051434 100644 --- src/hg/js/hui.js +++ src/hg/js/hui.js @@ -1589,63 +1589,65 @@ parentEl.appendChild(colorPickerContainer); } else { alert("Must supply parentNode to append color picker"); throw new Error(); } let opt = { hideAfterPaletteSelect: true, color: $(inpSpec).val(), showPalette: true, showInput: true, showSelectionPalette: true, showInitial: true, preferredFormat: "hex", localStorageKey: "genomebrowser", change: function() { - let color = $(inpSpec).spectrum("get").toHexString(); + let color = $(inpSpec).spectrum("get"); $(inpText).val(color); saveHlColor(color, trackName); - if (statusSpan) statusSpan.textContent = "color override active"; + if (statusSpan) statusSpan.textContent = ""; }, }; $(inpSpec).spectrum(opt); // update the color picker if you change the input box $(inpText).on("change", function() { $(inpSpec).spectrum("set", $(inpText).val()); saveHlColor($(inpText).val(), trackName); - if (statusSpan) statusSpan.textContent = "color override active"; + if (statusSpan) statusSpan.textContent = ""; }); let statusSpan = document.createElement("span"); statusSpan.style = "margin-left: 10px; font-style: italic"; colorPickerContainer.appendChild(statusSpan); - // show initial status when a color override is active - if (hasOverride) { - statusSpan.textContent = "color override active"; + // show initial status if itemRgb is active and no color override is set + if (hasItemRgb && !hasOverride) { + statusSpan.textContent = "items are currently being colored per item"; } // Restore the default on Reset link click $(inpResetLink).on("click", function() { $(inpText).val(defaultColor); $(inpSpec).spectrum("set", defaultColor); if (cartVar === "hlColor") { saveHlColor(defaultColor, trackName); } else { // clear the cart variable so itemRgb and other per-item coloring is restored saveHlColor("", trackName); - statusSpan.textContent = ""; + if (hasItemRgb) { + statusSpan.textContent = "items are currently being colored per item"; + } } }); $(inpSpec).spectrum("set", $(inpText).val()); } function superUiSetAllTracks(onlyVisible) { /* called when user clicks the 'Apply to all' buttons: sets all viz dropdowns to the #superSubViz value */ let newVal = $('#superSubViz').val(); var selects = document.querySelectorAll('#superTrackTable select'); for (var i = 0; i < selects.length; i++) { var sel = selects[i]; if (sel.id==="superSubViz") continue; if (onlyVisible && sel.value === 'hide') continue;