644f1ed70c1b04896944f66bdfa03c16278135d6
braney
  Fri Jul 31 15:16:12 2026 -0700
quickLift: keep the difference lines from standing still during a drag

The difference lines are drawn up over a track's center label, but center
labels don't scroll with the data, so the lines sat still while the image
moved underneath them.  hgTracks now keeps each center label as text with
the color it was drawn in, and flags the label when lines were painted over
it.  While the image is being dragged hgTracks.js hides that slice and puts
the label up as text in its place, then swaps the image back on drop.
Windows with no difference lines drawn are untouched.  refs #37974

diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index 7e742e0fbf9..ebf69bf4acb 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -1688,30 +1688,41 @@
 
                 // under this condition the characters that have descenders end up bleeding
                 // over into tracks that don't actually draw the label which 
                 // results in grek.  In this condition make the center label font smaller
                 int fontsize = findBiggest(fontHeight - 4);
                 char size[1024];
                 safef(size, sizeof size, "%d", fontsize);
                 labelfont = mgFontForSizeAndStyle(size, "medium");
                 }
             }
         else
             labelfont = font;
         labelColor = maybeDarkerLabels(track, hvg, labelColor);
         hvGfxTextCentered(hvg, insideX, y+1, fullInsideWidth, insideHeight,
                           labelColor, labelfont, label);
+        if (theImgBox && curImgTrack)
+            {
+            // Keep the label as text too.  If something ends up drawn over this label
+            // (quickLift difference lines), dragScroll can't show the image slice while
+            // the image is moving, and puts up an html stand-in built from this instead.
+            struct rgbColor rgb = hvGfxColorIxToRgb(hvg, labelColor);
+            char color[16];
+            safef(color, sizeof color, "#%02X%02X%02X", rgb.r, rgb.g, rgb.b);
+            curImgTrack->cntrLabText = cloneString(label);
+            curImgTrack->cntrLabTextColor = cloneString(color);
+            }
         if (track->nextItemButtonable && track->nextPrevItem && !tdbIsComposite(track->tdb))
             {
             if (withNextItemArrows || trackDbSettingOn(track->tdb, "nextItemButton"))
                 {
                 doLabelNextItemButtons(track, parentTrack, hvg, font, y, trackPastTabX,
                                        trackPastTabWidth, fontHeight, insideHeight, labelColor);
                 toggleDone = TRUE;
                 }
             }
         if (!toggleDone)
             {
         #ifdef IMAGEv2_SHORT_TOGGLE
             // make toggle cover only actual label
             int size = mgFontStringWidth(font,label) + 12;  // get close enough to the label
             if (trackPastTabWidth > size)