78a7cd90a1fa609f49593c53e9a34bbb746f8feb tdreszer Wed Aug 31 14:38:47 2011 -0700 reverse complement was clipping map items in dragScroll. Turns out insideX is (at least in this case) unaware of reverse complement. diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c index ff2415e..7b3efe0 100644 --- src/hg/hgTracks/simpleTracks.c +++ src/hg/hgTracks/simpleTracks.c @@ -737,38 +737,34 @@ if (directUrl) { safef(link,sizeof(link),directUrl, item, chromName, start, end, encodedTrack, database); if (withHgsid) safef(link+strlen(link),sizeof(link)-strlen(link),"&%s", cartSidUrlString(cart)); } else { safef(link,sizeof(link),"%s&o=%d&t=%d&g=%s&i=%s", hgcNameAndSettings(), start, end, encodedTrack, encodedItem); // NOTE: chopped out winStart/winEnd } if (extra != NULL) safef(link+strlen(link),sizeof(link)-strlen(link),"&%s", extra); // Add map item to currnent map (TODO: pass in map) #ifdef IMAGEv2_SHORT_MAPITEMS - if(x < insideX && xEnd > insideX) - { - if((insideX - x) < (xEnd - insideX)) + if(!revCmplDisp && x < insideX && xEnd > insideX) // Why does insideX=118 in reverse complement?? x = insideX; - else - xEnd = insideX-1; - //warn("mapBoxHgcOrHgGene(%s) map item spanning slices. LX:%d TY:%d RX:%d BY:%d insideX:%d link:[%s]",track,x, y, xEnd, yEnd, insideX, link); - } + else if (revCmplDisp && x < insideWidth && xEnd > insideWidth) + xEnd = insideWidth - 1; #endif//def IMAGEv2_SHORT_MAPITEMS imgTrackAddMapItem(curImgTrack,link,(char *)(statusLine!=NULL?statusLine:NULL),x, y, xEnd, yEnd, track); } else { hPrintf("<AREA SHAPE=RECT COORDS=\"%d,%d,%d,%d\" ", x, y, xEnd, yEnd); if (directUrl) { hPrintf("HREF=\""); hPrintf(directUrl, item, chromName, start, end, encodedTrack, database); if (withHgsid) hPrintf("&%s", cartSidUrlString(cart)); } else {