7cc2de4244e51395682085c51e3fe27ba9f1cfc5
chmalee
Fri Apr 3 16:15:20 2026 -0700
Items with a tooltip but no name now get their mouseovers to show up correctly, refs #37322
diff --git src/hg/hgTracks/imageV2.c src/hg/hgTracks/imageV2.c
index 75224207156..ca7adb0023d 100644
--- src/hg/hgTracks/imageV2.c
+++ src/hg/hgTracks/imageV2.c
@@ -1852,30 +1852,35 @@
if (cfgOptionBooleanDefault("showMouseovers", FALSE))
{
if (isNotEmpty(item->tooltip))
hPrintf(" title='%s' data-tooltip='%s'", encodedString, attributeEncode(item->tooltip));
else
hPrintf(" TITLE='%s'", encodedString);
}
else
{
// for TITLEs, which we use for mouseOvers, since they can't have HTML in
// them, we substitute a unicode new line for
after we've encoded it.
// This is stop-gap until we start doing mouseOvers entirely in Javascript
hPrintf(" TITLE='%s'", replaceChars(encodedString,"<br>", "
"));
}
}
+ else if (isNotEmpty(item->tooltip) && cfgOptionBooleanDefault("showMouseovers", FALSE))
+ {
+ // some items have no title string (no item name) but do have tooltips
+ hPrintf(" data-tooltip='%s'", attributeEncode(item->tooltip));
+ }
if (item->id != NULL)
hPrintf(" id='%s'", item->id);
hPrintf(">" );
}
hPrintf("\n");
return TRUE;
}
static void imageDraw(struct imgBox *imgBox,struct imgTrack *imgTrack,struct imgSlice *slice,
char *name,int offsetX,int offsetY,boolean useMap)
// writes an image as HTML
{
if (slice->parentImg && slice->parentImg->file != NULL)
{
hPrintf(" 