75ffe3b6a127bec72fdb44290af9b98a14eb79dc
kate
  Fri Jan 11 15:27:03 2019 -0800
Partial implementation of 'centerLabelsPack' setting, to suppress center labels in pack mode (when setting is 'off').  This checkin suppresses center labels but doesn't show left labels. refs #22739

diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index d901498..04cc918 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -5383,31 +5383,30 @@
 
     long lastTime = 0;
     y = yAfterRuler;
     if (measureTiming)
         lastTime = clock1000();
     for (flatTrack = flatTracks; flatTrack != NULL; flatTrack = flatTrack->next)
         {
         track = flatTrack->track;
 
 	// parallelize more this?:
 	
         //ORIG if (track->limitedVis == tvHide)
 	if (isLimitedVisHiddenForAllWindows(track))
             continue;
 
-
         int centerLabelHeight = (isCenterLabelIncluded(track) ? fontHeight : 0);
         int yStart = y + centerLabelHeight;
         // ORIG int yEnd   = y + trackPlusLabelHeight(track, fontHeight);
 	int yEnd   = y + flatTrack->maxHeight;
         if (theImgBox)
             {
             // data slice of tracks
             sliceOffsetY     = yStart;
             sliceHeight      = yEnd - yStart - 1;
             curImgTrack = imgBoxTrackFind(theImgBox,track->tdb,NULL);
             if (sliceHeight > 0)
                 {
                 curSlice    = imgTrackSliceUpdateOrAdd(curImgTrack,stData,theOneImg,NULL,
                                                        sliceWidth[stData],sliceHeight,
                                                        sliceOffsetX[stData],sliceOffsetY);
@@ -5454,31 +5453,33 @@
 		    {
 		    warn("Draw tracks skipping %s because winTrack->limitedVis=hide", winTrack->track);
 		    continue;
 		    }
 		if (insideWidth >= 1)  // do not try to draw if width < 1.
 		    {
 		    int ynew = doDrawItems(winTrack, hvg, font, y, &lastTime);
 		    if ((ynew-y) > flatTrack->maxHeight)  // so compiler does not complain ynew is not used.
 			errAbort("oops track too high!");
 		    }
 		}
 	    setGlobalsFromWindow(windows); // first window
 	    y = savey + flatTrack->maxHeight;
 	    }
 
-        if (theImgBox && track->limitedVis == tvDense && tdbIsCompositeChild(track->tdb))
+        if (theImgBox && tdbIsCompositeChild(track->tdb) &&
+                (track->limitedVis == tvDense ||
+                 (track->limitedVis == tvPack && centerLabelHeight == 0)))
             mapBoxToggleVis(hvg, 0, yStart,tl.picWidth, sliceHeight,track);
             // Strange mapBoxToggleLogic handles reverse complement itself so x=0,width=tl.picWidth
 
         if (yEnd != y)
             warn("Slice height for track %s does not add up.  Expecting %d != %d actual",
                  track->shortLabel, yEnd - yStart - 1, y - yStart);
         }
 
     calcWiggleOrdering(cart, flatTracks);
     y++;
     }
 
 /* post draw tracks leftLabels */
 
 /* if a track can draw its left labels, now is the time since it