3b98a678e402b6efa994f74fdb22b22a0a16c7af tdreszer Wed Aug 24 13:53:44 2011 -0700 Katrina says 'No need to change size (and loose commas) when panning.' diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index e44c131..43ed502 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -1170,34 +1170,32 @@ var portalScrolledX = (hgTracks.imgBoxPortalOffsetX+hgTracks.imgBoxLeftLabel) + newOffsetX; var recalculate = false; var newPortalStart = hgTracks.imgBoxPortalStart - Math.round(portalScrolledX*hgTracks.imgBoxBasesPerPixel); // As offset goes down, bases seen goes up! if( newPortalStart < hgTracks.chromStart && bounded) { // Stay within bounds newPortalStart = hgTracks.chromStart; recalculate = true; } var newPortalEnd = newPortalStart + portalWidthBases; if( newPortalEnd > hgTracks.chromEnd && bounded) { newPortalEnd = hgTracks.chromEnd; newPortalStart = newPortalEnd - portalWidthBases; recalculate = true; } if(newPortalStart > 0) { - // XXXX ? hgTracks.imgBoxPortalStart = newPortalStart; - // XXXX ? hgTracks.imgBoxPortalEnd = newPortalEnd; var newPos = hgTracks.chromName + ":" + commify(newPortalStart) + "-" + commify(newPortalEnd); - setPosition(newPos, (newPortalEnd - newPortalStart + 1)); + setPosition(newPos, 0); // 0 means no need to change the size } if (recalculate && hgTracks.imgBoxBasesPerPixel > 0) { // Need to recalculate X for bounding drag portalScrolledX = (hgTracks.imgBoxPortalStart - newPortalStart) / hgTracks.imgBoxBasesPerPixel; newOffsetX = portalScrolledX - (hgTracks.imgBoxPortalOffsetX+hgTracks.imgBoxLeftLabel); } return newOffsetX; } function mapTopAndBottom(mapName,east,west) { // Find the top and bottom px given left and right boundaries var mapPortal = { top: -10, bottom: -10 }; var items = $("map[name='"+mapName+"']").children(); if ($(items).length>0) { $(items).each(function(t) { var loc = this.coords.split(",");