5feddd3370e1418ec4a860f826d74d32b37c09f5 larrym Wed Nov 17 16:39:08 2010 -0800 always pull out new visibility to update local visibility in handleUpdateTrackMap diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index 32b57a2..3db56c9 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -1557,30 +1557,32 @@ { if(window.open("../cgi-bin/hgc?hgsid=" + getHgsid() + "&g=getDna&i=mixed&c=" + chrom + "&l=" + (chromStart - 1) + "&r=" + chromEnd) == null) { windowOpenFailedMsg(); } } else { var newPosition = setPositionByCoordinates(chrom, chromStart, chromEnd); if(browser == "safari" || imageV2) { // We need to parse out more stuff to support resetting the position under imageV2 via ajax, but it's probably possible. // See comments below on safari problems. jQuery('body').css('cursor', 'wait'); if(document.TrackForm) document.TrackForm.submit(); else document.TrackHeaderForm.submit(); } else { + // XXXX This attempt to "update whole track image in place" didn't work for a variety of reasons, so this is dead code, but + // I'm leaving it in case we try to implement this functionality in the future. jQuery('body').css('cursor', ''); $.ajax({ type: "GET", url: "../cgi-bin/hgTracks", data: "hgt.trackImgOnly=1&hgt.ideogramToo=1&position=" + newPosition + "&hgsid=" + getHgsid(), dataType: "html", trueSuccess: handleUpdateTrackMap, success: catchErrorOrDispatch, error: errorHandler, cmd: cmd, cache: false }); } } } @@ -2034,43 +2036,45 @@ function handleUpdateTrackMap(response, status) { // 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. // // e.g.: // Parse out new ideoGram url (if available) var a = /]+SRC[^>]+id='chrom'[^>]*)>/.exec(response); if(a && a[1]) { b = /SRC\s*=\s*"([^")]+)"/.exec(a[1]); if(b[1]) { $('#chrom').attr('src', b[1]); } } - if(this.newVisibility) { var re = /<\!-- trackDbJson -->\n