db7c8abb6d7674bb26f579eabb58bc080ce76fdd
max
  Tue May 12 07:04:05 2020 -0700
adding a protease track to uniprot, refs #25192

diff --git src/hg/js/hui.js src/hg/js/hui.js
index 48438fb..5b3d858 100644
--- src/hg/js/hui.js
+++ src/hg/js/hui.js
@@ -88,53 +88,70 @@
 {
     // Make main display dropdown show full if currently hide
     var visDD = normed($("select.visDD")); // limit to hidden
     if (visDD) {
         if ($(visDD).attr('selectedIndex') === 0) {
             $(visDD).attr('selectedIndex',$(visDD).children('option').length - 1);
 	        $(visDD).change();// trigger on change code, which may trigger supertrack reshaping
         }                         // and effecting inherited subtrack vis
 
         // If superChild and hidden by supertrack, wierd things go on unless we trigger reshape
         if ($(visDD).hasClass('superChild'))
             visTriggersHiddenSelect(visDD);
     }
 }
 
+function hideAll() {
+    /* Make main display dropdown hide if currently shown */
+    var visDD = normed($("select.visDD"));
+    if (visDD) {
+        if ($(visDD).attr('selectedIndex') !== 0) {
+            $(visDD).attr('selectedIndex', 0);
+            $(visDD).change();
+        }
+        // If superChild and hidden by supertrack, wierd things go on unless we trigger reshape
+        if ($(visDD).hasClass('superChild'))
+            visTriggersHiddenSelect(visDD);
+    }
+}
+
 function matSubCbClick(subCB)
 {
 // subCB:onclick  When a subtrack checkbox is clicked, it may result in
 // Clicking/unclicking the corresponding matrix CB.  Also the
 // subtrack may be hidden as a result.
 
     // NOTE: if "subCfg" then 'change' event will update it
     if (isFauxDisabled(subCB,false)) { // disabled subCB is still clickable when "subCfg"
         subCB.checked = true;
         fauxDisable(subCB,false,""); // enable and get rid of message
     }
     matSubCBsetShadow(subCB,false);
     hideOrShowSubtrack(subCB);
     // When subCBs are clicked, 3-state matCBs may need to be set
     var classes = matViewClasses('hidden');
     classes = classes.concat( matAbcCBclasses(false) );
     var matCB = matCbFindFromSubCb( subCB );
     if (matCB) {
         matChkBoxNormalize( matCB, classes );
     }
 
     if (subCB.checked)
         exposeAll();  // Unhide composite vis?
+    else if ($("input.subCB:checked").length===0) {
+        hideAll();
+    }
 
     matSubCBsSelected();
 }
 
 function matCbClick(matCB)
 {
 // matCB:onclick  When a matrix CB is clicked, the set of subtracks checked may change
 // Also called indirectly by matButton:onclick via matSetMatrixCheckBoxes
 
     var classList = $( matCB ).attr("class").split(" ");
     var isABC = (aryFind(classList,"abc") !== -1);
     classList = aryRemove(classList,["matCB","changed","disabled","abc"]);
     if (classList.length === 0 )
        matSubCBsCheck(matCB.checked);
     else if (classList.length === 1 )