2961c25331a73eba4ddbca0b848b43e4a467fa75 chmalee Thu Jul 23 11:12:40 2026 -0700 Trying this again. Let users use a rightclick option to change the color of single bed-like items, gated via hg.conf setting canColorItems, refs #37778 diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index 3ce6f9ba3be..1d7f416e256 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -9104,44 +9104,51 @@ char *freezeName = NULL; boolean hideAll = cgiVarExists("hgt.hideAll"); boolean hideTracks = cgiOptionalString( "hideTracks") != NULL; boolean defaultTracks = cgiVarExists("hgt.reset"); boolean showedRuler = FALSE; boolean showTrackControls = cartUsualBoolean(cart, "trackControlsOnMain", TRUE); boolean multiRegionButtonTop = cfgOptionBooleanDefault(MULTI_REGION_CFG_BUTTON_TOP, TRUE); long thisTime = 0, lastTime = 0; basesPerPixel = ((float)virtWinBaseCount) / ((float)fullInsideWidth); zoomedToBaseLevel = (virtWinBaseCount <= fullInsideWidth / tl.mWidth); zoomedToCodonLevel = (ceil(virtWinBaseCount/3) * tl.mWidth) <= fullInsideWidth; zoomedToCodonNumberLevel = (ceil(virtWinBaseCount/3) * tl.mWidth * 5) <= fullInsideWidth; zoomedToCdsColorLevel = (virtWinBaseCount <= fullInsideWidth*3); +boolean canColorItems = cfgOptionBooleanDefault("canColorItems", FALSE); +if (canColorItems) + createItemColorHash(); if (psOutput != NULL) { hPrintDisable(); hideControls = TRUE; withNextItemArrows = FALSE; withNextExonArrows = FALSE; hgFindMatchesShowHighlight = FALSE; } /* Tell browser where to go when they click on image. */ hPrintf("