0b7ad07f09aa22820bca7dcfc65ea71813c753a0
max
  Fri Oct 4 05:37:43 2024 -0700
not hiding ruler track anymore, not placing any track above the ruler track, refs #23793

diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js
index d90c29c..f7cc4ad 100644
--- src/hg/js/hgTracks.js
+++ src/hg/js/hgTracks.js
@@ -2116,31 +2116,31 @@
 
   ///////////////////////////////////////
  //// rightClick (aka context menu) ////
 ///////////////////////////////////////
 var rightClick = {
 
     menu: null,
     selectedMenuItem: null,   // currently choosen context menu item (via context menu).
     floatingMenuItem: null,
     currentMapItem:   null,
     supportZoomCodon: true,  // add zoom to exon and zoom to codon to right click menu
     clickedHighlightIdx : null,  // the index (0,1,...) of the highlight item that overlaps the last right-click
 
     moveTo : function(id, topOrBottom) {
         /* move a track to either "top" or "bottom" position */
-        let newPos = "-1";
+        let newPos = "0.5";
         if (topOrBottom==="bottom") {
             newPos = String(parseInt($(".imgOrd").last().attr("abbr"))+1);
         }
 
         let trEl = $(document.getElementById('tr_' + id));
         trEl.attr('abbr', newPos);
 
         dragReorder.sort($("#imgTbl"));
         dragReorder.setOrder($("#imgTbl"));
     },
     hideTracks: function (ids) 
     {
         var cartVars = [];
         var cartVals = [];
 
@@ -2470,31 +2470,31 @@
 
             $.ajax({
                 type: "PUT",
                 async: false,
                 url: "../cgi-bin/hgCollection",
                 data: "cmd=addTrack&track=" + id + "&collection=" + collectionName + "&hgsid=" + getHgsid(),
                 trueSuccess: mySuccess,
                 success: catchErrorOrDispatch,
                 error: errorHandler,
             });
 
             imageV2.fullReload();
         } else if (cmd === "hideOthers") {
             var hideIds = [];
             for (var otherId in hgTracks.trackDb) {
-                if (otherId!==id) 
+                if (otherId!==id && otherId!=="ruler") 
                     hideIds.push(otherId);
             }
             rightClick.hideTracks(hideIds);
         } else if (cmd === "moveTop") {
             rightClick.moveTo(id, "top");
         } else if (cmd === "moveBottom") {
             rightClick.moveTo(id, "bottom");
         } else if ((cmd === 'sortExp') || (cmd === 'sortSim')) {
             url = "hgTracks?hgsid=" + getHgsid() + "&" + cmd + "=";
             rec = hgTracks.trackDb[id];
             if (tdbHasParent(rec) && tdbIsLeaf(rec))
                 url += rec.parentTrack;
             else {
                 // The button already has the ref
                 var link2 = normed($( 'td#td_btn_'+ rightClick.selectedMenuItem.id ).children('a'));