c105602024944ec42576736467fcddd7337367d0
max
  Thu Mar 5 15:38:05 2026 -0800
fixing composite upcasing, refs #37200

diff --git src/hg/js/subCfg.js src/hg/js/subCfg.js
index 0ff0a127350..cca8be93433 100644
--- src/hg/js/subCfg.js
+++ src/hg/js/subCfg.js
@@ -414,31 +414,31 @@
         if (limitedVis === 1)
             visText = 'dense';
         else if (limitedVis === 2) {
             if (subCfg.canPack)
                 visText = 'squish';
             else
                 visText = 'full';
         } else if (limitedVis === 3)
             visText = 'pack';
         else if (limitedVis === 4)
             visText = 'full';
 
         var children = subCfg.visChildrenFind(viewObj);
         $(children).each(function (i) {
             if ($(this).hasClass('fauxInput')) {
-                $(this).text(visText);
+                $(this).text(capitalizeFirstLetter(visText));
             } else {
                 $(this).attr('selectedIndex',limitedVis);
                 subCfg.clearChange(this);
             }
         });
     },
 
     propagateVis: function (parentObj,viewTag)
     { // propagate vis settings to subtrack children
         if (!viewTag || viewTag.length === 0) {
             // Walk through views and set with this
             var parentVis = parentObj.selectedIndex;
             if (subCfg.viewTags.length > 0) {
                 for (var ix=0;ix<subCfg.viewTags.length;ix++) {
                     var viewObj = subCfg.viewObjFind(subCfg.viewTags[ix]);
@@ -457,31 +457,31 @@
                         visText = 'full';
                 } else if (parentVis === 3)
                     visText = 'pack';
                 else if (parentVis === 4)
                     visText = 'full';
                 var children = subCfg.visChildrenFind(parentObj);
 
                 var checkedCount = 0;
                 $(children).each(function (i) {
                     // the checkbox is in the <td> right before the one of $(this)
                     if ($(this).parent().prev().find("[type='checkbox']")[0].checked)
                         checkedCount++;
 
                     // apply the visibility to the subtrack
                     if ($(this).hasClass('fauxInput')) {
-                        $(this).text(visText);
+                        $(this).text(capitalizeFirstLetter(visText));
                     } else {
                         $(this).attr('selectedIndex',parentVis);
                         subCfg.clearChange(this);
                     }
                 });
 
                 // when nothing is checked, the visibility has been applied but everything is still hidden. 
                 // This is probably not what the user wanted, so in lack of a better idea, we select all checkboxes
                 if (checkedCount === 0)
                     // check all checkboxes
                     $(".subCB[type='checkbox']").prop("checked", true);
             }
         } else {
             // First get composite vis to limit with
             var compObj = subCfg.compositeObjFind(undefined);
@@ -656,31 +656,31 @@
             cmd: "cfg",
             cache: false
         });
     },
 
     replaceWithVis: function (obj,subtrack,open)
     { // Replaces the current fauxVis object with a true visibility selector
 
         if ($(obj).hasClass('disabled'))
             return;
         var classList = $( obj ).attr("class").split(" ");
         classList = aryRemove(classList,["disabled"]);
         var view = classList[classList.length - 1]; // This relies on view being the last class!!!
         var selectHtml  = "<SELECT name='"+subtrack+"' class='normalText subVisDD "+view+"'";
             selectHtml += " style='width:70px;'>";
-        var selected = $(obj).text();
+        var selected = $(obj).text().toLowerCase();
         var visibilities = ['hide','dense','squish','pack','full'];
         if (subCfg.canPack === false)
             visibilities = ['hide','dense','full'];
         $(visibilities).each( function (ix) {
              var vis = visibilities[ix];
              selectHtml += "<OPTION"+(visibilities[ix] === selected ? " SELECTED":"")+" VALUE='"+vis+"'>";
              selectHtml += capitalizeFirstLetter(vis)+"</OPTION>";
         });
         selectHtml += "</SELECT>";
         $(obj).replaceWith(selectHtml);
         var newObj = $("select[name='"+subtrack+"']");
         if (open) {
             $(newObj).css({'zIndex':'2','vertical-align':'top'});
             // For some reason IE11 will hang if the sect is opened to start with!
             // This ungraceful fix avoids the hang, but a nicer solution would be apprciated!