e0b7a6700dfca47e0723d2d5a2e5b3c745f51315
jcasper
  Tue Feb 28 12:38:00 2023 -0800
Fixing a few missed cases for transparency, refs #30569

diff --git src/hg/hgTracks/bigBedTrack.c src/hg/hgTracks/bigBedTrack.c
index 63581ab..a5d7c3b 100644
--- src/hg/hgTracks/bigBedTrack.c
+++ src/hg/hgTracks/bigBedTrack.c
@@ -581,30 +581,32 @@
 
         if (track->visibility != tvDense && lf && doWindowSizeFilter && bb->start < winStart && bb->end > winEnd)
             {
             mergeCount++;
             struct bed *bed = bedLoadN(bedRow, fieldCount);
             struct linkedFeatures *tmp = bedMungToLinkedFeatures(&bed, tdb, fieldCount,
                 scoreMin, scoreMax, useItemRgb);
             if (spannedLf)
                 {
                 if (tmp->start < spannedLf->start)
                     spannedLf->start = tmp->start;
                 if (tmp->end > spannedLf->end)
                     spannedLf->end = tmp->end;
                 if (fieldCount > 9) // average the colors in the merged item
                     {
+                    // Not sure how averaging alphas in the merged item would work; probably better
+                    // to ignore it.
                     struct rgbColor itemColor = colorIxToRgb(lf->filterColor);
                     struct rgbColor currColor = colorIxToRgb(spannedLf->filterColor);
                     int r = currColor.r + round((itemColor.r - currColor.r) / mergeCount);
                     int g = currColor.g + round((itemColor.g - currColor.g) / mergeCount);
                     int b = currColor.b + round((itemColor.b - currColor.b) / mergeCount);
                     spannedLf->filterColor = MAKECOLOR_32(r,g,b);
                     }
                 }
             else
                 {
                 // setting the label here protects against the case when only one item would
                 // have been merged. When this happens we warn in the track longLabel that
                 // nothing happened and essentially make the spanned item be what the actual
                 // item would be. If multiple items are merged then the labels and mouseOvers
                 // will get fixed up later