Index: src/hg/js/hgTracks.js
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/js/hgTracks.js,v
retrieving revision 1.50
retrieving revision 1.51
diff -b -B -U 4 -r1.50 -r1.51
--- src/hg/js/hgTracks.js	30 Dec 2009 04:14:21 -0000	1.50
+++ src/hg/js/hgTracks.js	30 Dec 2009 19:48:20 -0000	1.51
@@ -1275,8 +1275,9 @@
                    url: "../cgi-bin/hgTrackUi?ajax=1&g=" + selectedMenuItem.id + "&hgsid=" + getHgsid(),
                    dataType: "html",
                    trueSuccess: handleTrackUi,
                    success: catchErrorOrDispatch,
+                   cmd: selectedMenuItem,
                    cache: true
                });
     } else if (cmd == 'dragZoomMode') {
         autoHideSetting = true;
@@ -1509,19 +1510,22 @@
                                    cache: true
                                },
                                resizable: true,
                                bgiframe: true,
-                               height: 600,
-                               width: 600,
+                               height: 'auto',
+                               width: 'auto',
+                               minHeight: 200,
+                               minWidth: 400,
                                modal: true,
                                closeOnEscape: true,
                                autoOpen: false,
-                               title: "Track Settings",
-                               close: function(){
+                               close: function() {
                                    // clear out html after close to prevent problems caused by duplicate html elements
                                    $('#hgTrackUiDialog').html("");
                                }
                            });
+    // Apparently the options above to dialog take only once, so we set title explicitly.
+    $('#hgTrackUiDialog').dialog('option' , 'title' , trackDbJson[this.cmd.id].shortLabel + " Track Settings");
     jQuery('body').css('cursor', '');
     $('#hgTrackUiDialog').dialog('open');
 }
 
@@ -1530,10 +1534,9 @@
 // Handle ajax response with an updated trackMap image (gif or png) and map.
 //
 // this.cmd can be used to figure out which menu item triggered this.
 //
-//    var a= /(<IMG SRC\s*=\s*([^"]+)"[^>]+id='trackMap'\s*>/.exec(response);
-// <IMG SRC = "../trash/hgtIdeo/hgtIdeo_hgwdev_larrym_61d1_8b4a80.gif" BORDER=1 WIDTH=1039 HEIGHT=21 USEMAP=#ideoMap id='chrom'>
+// e.g.: <IMG SRC = "../trash/hgtIdeo/hgtIdeo_hgwdev_larrym_61d1_8b4a80.gif" BORDER=1 WIDTH=1039 HEIGHT=21 USEMAP=#ideoMap id='chrom'>
     // Parse out new ideoGram url (if available)
     var a = /<IMG([^>]+SRC[^>]+id='chrom'[^>]*)>/.exec(response);
     if(a && a[1]) {
         b = /SRC\s*=\s*"([^")]+)"/.exec(a[1]);

