ccf139dca8836989711ff43a63e816ae8eb085e9 tdreszer Wed Aug 3 13:04:07 2011 -0700 For dragScrooling fixed packed sideLabels on 1X and bound scrolling to within chrom. (redmine 4811) diff --git src/hg/hgTracks/imageV2.c src/hg/hgTracks/imageV2.c index 661d746..b5f834f 100644 --- src/hg/hgTracks/imageV2.c +++ src/hg/hgTracks/imageV2.c @@ -1861,33 +1861,34 @@ if(slice) offset = (slice->offsetX * -1); // This works because the ruler has a slice } hPrintf("<style type='text/css'>\n"); if(offset != 0) hPrintf("td.tdData {background-image:url(\"%s\");background-repeat:repeat-y;background-position:%dpx;}\n",imgBox->bgImg->file,offset); else hPrintf("td.tdData {background-image:url(\"%s\");background-repeat:repeat-y;}\n",imgBox->bgImg->file); hPrintf("</style>\n"); } #ifdef IMAGEv2_DRAG_SCROLL if(imgBox->showPortal) { // Let js code know what's up + int chromSize = hChromSize(database, chromName); + jsonHashAddNumber( jsonForClient,"chromStart", 1); + jsonHashAddNumber( jsonForClient,"chromEnd", chromSize); 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("<TABLE id='imgTbl' border=0 cellspacing=0 cellpadding=0 BGCOLOR='%s'",COLOR_WHITE);//COLOR_RED); // RED to help find bugs hPrintf(" width=%d",imgBox->showPortal?(imgBox->portalWidth+imgBox->sideLabelWidth):imgBox->width); hPrintf(" class='tableWithDragAndDrop'");