c32d6e08d19a0b8ad7ece12aab39d0ba0be7a9e1
chmalee
  Mon Dec 1 16:26:27 2025 -0800
hgTracks tooltips use the data-tooltip attribute on the area element if present, falling back to the title attribute. Makes title attributes for (hopefully all) tracks with special tooltips put the tooltip string into the data-tooltip attribute instead of the title attribute, refs #35756

diff --git src/hg/hgTracks/vcfTrack.c src/hg/hgTracks/vcfTrack.c
index 997bf6ea3ef..858ca0bb332 100644
--- src/hg/hgTracks/vcfTrack.c
+++ src/hg/hgTracks/vcfTrack.c
@@ -1298,31 +1298,31 @@
 	if (isCenter)
 	    dyStringAppendC(dy, '[');
 	int altCount = c->leafCount - c->refCounts[i] - c->unkCounts[i];
 	if (c->refCounts[i] > 0 && altCount > 0)
 	    dyStringAppendC(dy, '*');
 	else if (strlen(allele) == 1)
 	    dyStringAppendC(dy, allele[0]);
 	else
 	    dyStringPrintf(dy, "(%s)", allele);
 	if (isCenter)
 	    dyStringAppendC(dy, ']');
 	}
     if (helper->endIx < helper->nRecords)
 	dyStringAppend(dy, "...");
     imgTrackAddMapItem(curImgTrack, TITLE_BUT_NO_LINK, dy->string,
-		       x1, y1, x2, y2, helper->track);
+		       x1, y1, x2, y2, helper->track, dy->string);
     }
 }
 
 /* Pixel y offset return type for recursive tree-drawing: */
 enum yRetType
     {
     yrtMidPoint,
     yrtStart,
     yrtEnd,
     };
 
 /* Callback for calculating y (in pixels) for a cluster node: */
 typedef int yFromNodeFunc(const struct slList *itemOrCluster, void *extraData,
 			  enum yRetType yType);
 
@@ -1718,31 +1718,31 @@
     char *lastSample = NULL;
     int gtHapIx;
     for (gtHapIx = gtHapStart;  gtHapIx < gtHapEnd;  gtHapIx++)
         {
         int gtIx = (gtHapOrder[gtHapIx] >> 1);
         char *sample = vcff->genotypeIds[gtIx];
         if (!lastSample || differentString(sample, lastSample))
             {
             if (isNotEmpty(dy->string))
                 dyStringAppend(dy, ", ");
             dyStringAppend(dy, sample);
             lastSample = sample;
             }
         }
     imgTrackAddMapItem(curImgTrack, TITLE_BUT_NO_LINK, dy->string,
-		       leftLabelX, y+yStart, labelEnd, y+yStart+1, track);
+		       leftLabelX, y+yStart, labelEnd, y+yStart+1, track, dy->string);
     }
 }
 
 static unsigned int *gtHapOrderFromGtOrder(struct vcfFile *vcff,
                                              boolean *retIsAllDiploid, int *retGtHapCount)
 {
 int ploidy = 2; // Assuming diploid genomes here, no XXY, tetraploid etc.
 int gtCount = vcff->genotypeCount;
 boolean isAllDiploid = TRUE;
 unsigned int *gtHapOrder = needMem(gtCount * ploidy * sizeof(unsigned int));
 int orderIx = 0;
 int gtIx;
 // Determine the number of chromosome rows; for chrX, can be mix of diploid and haploid.
 for (gtIx=0;  gtIx < gtCount;  gtIx++)
     {