31d76baa5576bc0fe479c2b9ae3d06a6df875cc1 angie Tue Sep 25 13:32:17 2018 -0700 In the multi-region position pop-up, when viewing just a subregion of a large virt, add a hint about the full region size to make it clear that it's a subregion not the whole thing. diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index 968bf01..eea3356 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -542,49 +542,56 @@ cache: false }); return genomePos.convertedVirtCoords; }, positionDisplayDialog: function () // Show the virtual and real positions of the windows { var position = genomePos.get(); var positionDialog = $("#positionDialog")[0]; if (!positionDialog) { $("body").append("<div id='positionDialog'><span id='positionDisplayPosition'></span>"); positionDialog = $("#positionDialog")[0]; } if (hgTracks.windows) { - var i,len; + var i, len, end; + var matches = /^virt:[0-9]+-([0-9]+)/.exec(position); var str = position; + if (matches) { + end = matches[1]; + if (end < hgTracks.chromEnd) { + str += "<br>(full virtual region is virt:1-" + hgTracks.chromEnd + ")"; + } + } if (!(hgTracks.virtualSingleChrom && (hgTracks.windows.length === 1))) { str += "<br>\n"; str += "<br>\n"; str += "<ul style='list-style-type:none; max-height:200px; padding:0; width:80%; overflow:hidden; overflow-y:scroll;'>\n"; for (i=0,len=hgTracks.windows.length; i < len; ++i) { var w = hgTracks.windows[i]; str += "<li>" + w.chromName + ":" + (w.winStart+1) + "-" + w.winEnd + "</li>\n"; } str += "</ul>\n"; } $("#positionDisplayPosition").html(str); } else { $("#positionDisplayPosition").html(position); } $(positionDialog).dialog({ modal: true, - title: "Window-Positions", + title: "Multi-region position ranges", closeOnEscape: true, resizable: false, autoOpen: false, minWidth: 400, minHeight: 40, buttons: { "OK": function() { $(this).dialog("close"); } }, open: function () { // Make OK the focus/default action $(this).parents('.ui-dialog-buttonpane button:eq(0)').focus(); },