22c42295eaa2b41f48a6277e16282c679b3ae05a
galt
  Tue Jun 3 13:41:51 2025 -0700
fix horizontal centering for trackDescriptionOnly window in hgTracks.js

diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js
index 514b6d3575d..7cb68936b98 100644
--- src/hg/js/hgTracks.js
+++ src/hg/js/hgTracks.js
@@ -3297,31 +3297,30 @@
             else
                 {
                 note = "<br><b>Needs zoom to &lt; "+maxSize/1000+" kbp.</b></small></span></li>";
                 htmlLines.push('<li><span style="color:grey">'+shortLabel+": <small>"+longLabel+note);
                 }
         }
         htmlLines.push("</ul>");
         content = htmlLines.join("");
             
         var title = hgTracks.chromName + ":" + (hgTracks.winStart+1) + "-" + hgTracks.winEnd;
         if (hgTracks.nonVirtPosition)
             title = hgTracks.nonVirtPosition;
         title += " on another website";
         $("body").append("<div id='extToolDialog' title='"+title+"'><p>" + content + "</p>");
 
-	// GALT 
 	$('a.extToolLink2').on("click", function(){$('#extToolDialog').dialog('close');});
 
         // copied from the hgTrackUi function below
         var popMaxHeight = ($(window).height() - 40);
         var popMaxWidth  = ($(window).width() - 40);
         var popWidth     = 600;
         if (popWidth > popMaxWidth)
             popWidth = popMaxWidth;
 
         // also copied from the hgTrackUi code below
         $('#extToolDialog').dialog({
             resizable: false,
             height: popMaxHeight,
             width: popWidth,
             minHeight: 200,
@@ -4058,31 +4057,35 @@
             width: popWidth,
             minHeight: 200,
             minWidth: 400,
             maxHeight: popMaxHeight,
             maxWidth: popMaxWidth,
             modal: true,
             closeOnEscape: true,
             autoOpen: false,
             buttons: uiDialogButtons,
 
             // popup.ready() doesn't seem to work in open.
             open: function(event) {
                 // fix popup to a location -- near the top and somewhat centered on the browser image
                 $(event.target).parent().css('position', 'fixed');
                 $(event.target).parent().css('top', '18%');
+                if (popUp.trackDescriptionOnly) {
+                    $(event.target).parent().css('left', '15%');
+                } else {
                     $(event.target).parent().css('left', '30%');
+                }
                 var containerHeight = $(event.target).parent().height();
                 var offsetTop = $(event.target).parent()[0].offsetTop;
                 // from popMaxHeight calculation above:
                 var offsetBottom = 40;
                 var maxContainerHeight = $(window).height() - offsetTop - offsetBottom;
                 if (containerHeight > maxContainerHeight) {
                     $(event.target).parent().css('height', maxContainerHeight);
                     // the 100 below accounts for the buttons, and label, there is
                     // probably a better way to get the exact size of the container
                     // with no content
                     $(event.target).css('height', maxContainerHeight - 100);
                 }
 
                 if (!popUp.trackDescriptionOnly) {
                     $('#hgTrackUiDialog').find('.filterBy,.filterComp').each(