48886c882e7198f01b7c6bcaffa9ef107a291538
braney
  Tue Jul 21 13:38:08 2026 -0700
hgTracks: merge pixel-adjacent blocks when drawing direction barbs

Chain tracks show direction chevrons only on their aligned blocks, not on
the connector line between blocks.  When zoomed out the blocks smash
together and individually most are too narrow to hold a chevron, so a chain
showed only a couple of chevrons and its orientation was nearly invisible.

Accumulate blocks that touch in pixel space into a single span and draw the
barbs across the whole span, so the chevrons run continuously across a run
of smashed-together blocks.  The gap under which blocks merge is the new
hg.conf setting barbMergePixels (default 3); set it to 0 to disable merging
and get the old per-block barbs.  Only pixel-adjacent blocks merge, so genes
with visible introns and everything else render unchanged, refs #37889

diff --git src/product/ex.hg.conf src/product/ex.hg.conf
index 73f05b91977..4dc6783433d 100644
--- src/product/ex.hg.conf
+++ src/product/ex.hg.conf
@@ -709,15 +709,21 @@
 # UCSC live sites. Maximum number of items fetched from bigBed file. If the number of the items in the 
 # displayed region is greater than allowed (which is 100k in RR now), the track goes into coverage 
 # mode drawn by the summary/zoom levels in the bigBed. If a filter is set, the track will display the 
 # message "Too many items in window to filter.Zoom in or remove filters to view track.".
 #
 # vcfMaxItems=10000 # Default is 10k, no other RR value. Maximum number of items fetched from file. 
 # If the number of the items in the displayed region is greater than allowed (which is 10k in RR now), 
 # the track area will have the message "Too many items in region. Zoom in to view track.".
 #
 # The setting below is used to set a default cart for mirrors that will load the settings
 # in the pointed-to session whenever a cart reset happens. See the help page for more info
 # https://genome.ucsc.edu/goldenPath/help/docker.html#defaults
 # defaultCartName=defaultCart
 #
 # logCgiVarMaxLen=100 # Dumps short POST arguments to apache log, see #36533 (UCSC internal reference)
+#
+# barbMergePixels=3 # For direction "barbs" (strand chevrons), blocks that are within this
+# many pixels of each other are treated as one span so the chevrons run continuously across
+# them.  This mainly helps chains zoomed out, whose aligned blocks smash together such that
+# individually most are too narrow to hold a chevron.  Default is 3; set to 0 to disable
+# merging and draw barbs per block as before.  See #37889 (UCSC internal reference).