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/imageV2.h src/hg/hgTracks/imageV2.h index 6a0649e9dda..ebb9c6425f3 100644 --- src/hg/hgTracks/imageV2.h +++ src/hg/hgTracks/imageV2.h @@ -296,30 +296,36 @@ char *db; // Image for db (species) (assert imgTrack matches imgBox) char *chrom; // Image for chrom (assert imgTrack matches imgBox) long chromStart; // Image start (absolute, not portal position) long chromEnd; // Image end (absolute, not portal position) boolean plusStrand; // Image covers plus strand, not minus strand boolean hasCenterLabel; // A track may have a center label but not show it enum centerLabelSeen centerLabelSeen; // Conditionally displayed center labels are always // there but sometimes hidden boolean reorderable; // Is this track reorderable (by drag and drop) ? boolean ajaxRetrieval; // This track needs to be retrieved via ajax int order; // Image order: This keeps track of dragReorder enum trackVisibility vis; // Current visibility of track image struct imgSlice *slices; // Currently there should be four slices for every track: // data, centerLabel, sideLabel, button boolean linked; // is this track linked to another track (like squishyPack) + char *cntrLabText; // Center label as text and the color it was drawn in, for an + char *cntrLabTextColor; // html stand-in when the image slice can't be shown + boolean cntrLabDrawnOver; // Something is painted over the center label in the image + // (quickLift difference lines), so dragScroll must swap + // in the stand-in rather than drag the image out from + // under a label slice that doesn't move }; #define IMG_ANYORDER -2 #define IMG_FIXEDPOS -1 #define IMG_ORDERTOP 10000 #define IMG_ORDEREND 20000 #define IMG_ORDER_VAR "imgOrd" struct imgTrack *imgTrackStart(struct trackDb *tdb,char *name,char *db, char *chrom, long chromStart, long chromEnd, boolean plusStrand, boolean hasCenterLabel, enum trackVisibility vis, int order); // Starts an image track which will contain all image slices needed to render one track // Must completed by adding slices with imgTrackAddSlice() struct imgTrack *imgTrackUpdate(struct imgTrack *imgTrack,struct trackDb *tdb,char *name,