8ed2d68b3774dcfe96b43cb0d60ed36ca84009bd tdreszer Fri Jul 29 14:59:06 2011 -0700 Integrate my dragScroll with Larry's new json hash code. diff --git src/hg/hgTracks/imageV2.c src/hg/hgTracks/imageV2.c index b515bde..a182926 100644 --- src/hg/hgTracks/imageV2.c +++ src/hg/hgTracks/imageV2.c @@ -1860,40 +1860,45 @@ struct imgSlice *slice = imgTrackSliceGetByType(imgBox->imgTracks,stData); if(slice) offset = (slice->offsetX * -1); // This works because the ruler has a slice } hPrintf("\n"); } #ifdef IMAGEv2_DRAG_SCROLL if(imgBox->showPortal) { - hPrintf("\n", - (imgBox->plusStrand?imgBox->sideLabelWidth:0), - (int)((imgBox->portalStart - imgBox->chromStart) / imgBox->basesPerPixel),imgBox->basesPerPixel); + // Let js code know what's up + jsonHashAddBoolean(jsonForClient,"imgBoxPortal", TRUE); + jsonHashAddNumber( jsonForClient,"imgBoxChromStart", imgBox->chromStart); + jsonHashAddNumber( jsonForClient,"imgBoxChromEnd", imgBox->chromEnd); + jsonHashAddNumber( jsonForClient,"imgBoxWidth", (imgBox->width - imgBox->sideLabelWidth)); + jsonHashAddNumber( jsonForClient,"imgBoxPortalStart", imgBox->portalStart); + jsonHashAddNumber( jsonForClient,"imgBoxPortalEnd", imgBox->portalEnd); + jsonHashAddNumber( jsonForClient,"imgBoxPortalWidth", imgBox->portalWidth); + jsonHashAddNumber( jsonForClient,"imgBoxLeftLabel", (imgBox->plusStrand?imgBox->sideLabelWidth:0)); + jsonHashAddNumber( jsonForClient,"imgBoxPortalOffsetX",(long)((imgBox->portalStart - imgBox->chromStart) / imgBox->basesPerPixel)); + jsonHashAddDouble( jsonForClient,"imgBoxBasesPerPixel",imgBox->basesPerPixel); } +else #endif//def IMAGEv2_DRAG_SCROLL + jsonHashAddBoolean(jsonForClient,"imgBoxPortal", FALSE); hPrintf("