d48817aa07fcbde6e1471302fbed8cd98bc7b543 tdreszer Mon May 20 13:02:02 2013 -0700 Fixed problem where showing full sequence caused other sections to scroll horizontally off the page. diff --git src/hg/js/alleles.js src/hg/js/alleles.js index aa4347c..956f059 100644 --- src/hg/js/alleles.js +++ src/hg/js/alleles.js @@ -188,32 +188,35 @@ if (id == undefined || id === "") { $('div.hilite').remove(); hilites = []; } else { $('div.hilite').remove('#' + id); var ix = hilites.indexOf(hId); if (ix != -1) hilites.splice(ix,1); } } function hiliteSpecial(id) { // makes one single hilite more noticeable $('div.hiliteSpecial').removeClass('hiliteSpecial'); - if (id != undefined && id != "") + if (id != undefined && id != "") { $('div.hilite.'+id).addClass('hiliteSpecial'); + //$('td.var.'+id).addClass('hiliteSpecial'); + // Need to find column, then highlight each cell in column with some additional style. + } } function hilitesResize() { // resizes all hilite divs based upon the table height // In theory just changing height will work. In practice, need to recalc all //$('div.hilite').css('height',($('table#alleles').height() - 4) + 'px'); if (hilites.length > 0) { hiliteRemove(); hiliteAllDiffs(); if (hiliteId != '') hiliteSpecial( hiliteId ); } } function hiliteAllDiffs() @@ -393,16 +396,20 @@ setTimeout("alleles.delayedHilites()", 200); // Delay till after page settles // Want to sort on previos column if there was a sort before ajax update persistThroughUpdates(); } }; }()); // end & invocation of function that makes alleles // The following js depends upon the jQuery library $(document).ready(function() { // Gene Alleles table is sortable alleles.initialize(); + // This is really hgGene specific at this point... + // If the haplotypes section has full sequence displayed, then other sections would + // scroll horrizontally off the page without setting the max-width of those sections. + $('div.subheadingBar').parents('table').css({maxWidth:$(window).width() + "px"}); });