7becab8e9c95f4f90d37ef2f8ea215907534d9b3 angie Wed Apr 27 17:13:54 2016 -0700 Fixed problem with 'view sequences' button wrapping down in weird ways when the screen was narrow. refs #15277 diff --git src/hg/js/hgGateway.js src/hg/js/hgGateway.js index 9ec53ea..628bbf8 100644 --- src/hg/js/hgGateway.js +++ src/hg/js/hgGateway.js @@ -1011,37 +1011,42 @@ var inputOffset = $('#positionInput').offset(); var verticalMidpoint = (menuOffset.top + inputOffset.top) / 2; if (goOffset.left > inputOffset.left) { $goButton.offset({top: verticalMidpoint }); } else { // If the window shrinks and there's no longer room for the button, undo the above. $goButton.css('top', 0); } } function setRightColumnWidth() { // Adjust the width of the "Find Position" section so it fits to the right of the // "Browse/Select Species" section. var ieFudge = scrollbarWidth ? scrollbarWidth + 4 : 0; var extraFudge = 4; + var $contents = $('#findPositionContents'); + var sectionContentsPadding = (_.parseInt($contents.css("padding-left")) + + _.parseInt($contents.css("padding-right"))); var rightColumnWidth = ($('#pageContent').width() - $('#selectSpeciesSection').width() - ieFudge - extraFudge); if (rightColumnWidth >= 400) { $('#findPositionSection').width(rightColumnWidth); } updateGoButtonPosition(); + $('#findPositionTitle').outerWidth(rightColumnWidth + extraFudge); + $('#descriptionTitle').outerWidth(rightColumnWidth - sectionContentsPadding); } function setSpeciesPickerSizes(svgWidth, svgHeight) { // Adjust widths and heights of elements in #speciesPicker according to svg size. $('#speciesTree').width(svgWidth); $('#speciesTree').height(svgHeight); $('#speciesTreeContainer').height(svgHeight); // Make #speciesTreeContainer skinnier if a scrollbar is taking up space // in #speciesPicker. var leftover = ($("#speciesPicker").width() - scrollbarWidth); $("#speciesTreeContainer").width(leftover); } function highlightLabel(selectedName, scrollToItem) { // Highlight the selected species.