src/hg/hgTracks/expRatioTracks.c 1.43
1.43 2009/08/27 00:10:15 tdreszer
Fixed a couple bugs and ensured ps-pdf code still works with IMAGEv2
Index: src/hg/hgTracks/expRatioTracks.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/expRatioTracks.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -b -B -U 4 -r1.42 -r1.43
--- src/hg/hgTracks/expRatioTracks.c 17 Jul 2009 18:22:21 -0000 1.42
+++ src/hg/hgTracks/expRatioTracks.c 27 Aug 2009 00:10:15 -0000 1.43
@@ -174,22 +174,24 @@
char *encodedItem1 = cgiEncode(item1);
char *encodedItem2 = cgiEncode(item2);
x = hvGfxAdjXW(hvg, x, width);
#ifdef IMAGEv2_UI
-if(curMap != NULL)
+if(theImgBox && curMap)
{
char link[512];
safef(link,sizeof(link),"%s&o=%d&t=%d&g=%s&i=%s&i2=%s", // NOTE: winStart,winEnd removed due to portal
- hgcNameAndSettings(), start, end, track, encodedItem1, encodedItem2); // Note: chopped out winStart/winEnd
+ hgcNameAndSettings(), start, end, track, encodedItem1, encodedItem2);
mapSetItemAdd(curMap,link,statusLine,x, y, x+width, y+height);
}
-#else//ifndef IMAGEv2_UI
-hPrintf("<AREA SHAPE=RECT COORDS=\"%d,%d,%d,%d\" ", x, y, x+width, y+height);
-hPrintf("HREF=\"%s&o=%d&t=%d&g=%s&i=%s&i2=%s&c=%s&l=%d&r=%d&db=%s&pix=%d\" ",
+else
+#endif//def IMAGEv2_UI
+ {
+ hPrintf("<AREA SHAPE=RECT COORDS=\"%d,%d,%d,%d\" ", x, y, x+width, y+height);
+ hPrintf("HREF=\"%s&o=%d&t=%d&g=%s&i=%s&i2=%s&c=%s&l=%d&r=%d&db=%s&pix=%d\" ",
hgcNameAndSettings(), start, end, track, encodedItem1, encodedItem2,chromName, winStart, winEnd,
database, tl.picWidth);
-hPrintf("TITLE=\"%s\">\n", statusLine);
-#endif//ndef IMAGEv2_UI
+ hPrintf("TITLE=\"%s\">\n", statusLine);
+ }
freeMem(encodedItem1);
freeMem(encodedItem2);
}
@@ -1440,20 +1442,22 @@
!(sameString(tg->mapName, "expRatioUCSFDemo") || sameString(tg->mapName, "cnvLungBroadv2") || sameString(tg->mapName, "CGHBreastCancerUCSF") || sameString(tg->mapName, "expBreastCancerUCSF")) )
{
int xOffRc = hvGfxAdjXW(hvg, xOff, insideWidth);
#ifdef IMAGEv2_UI
- if(curMap != NULL)
+ if(theImgBox && curMap)
{
char link[512];
safef(link,sizeof(link),"%s&g=%s&i=zoomInMore",hgcNameAndSettings(), tg->mapName); // NOTE: winStart,winEnd removed due to portal
mapSetItemAdd(curMap,link,"zoomInMore",xOffRc, y, xOffRc+insideWidth, y+totalHeight);
}
- #else//ifndef IMAGEv2_UI
+ else
+ #endif//def IMAGEv2_UI
+ {
hPrintf("<AREA SHAPE=RECT COORDS=\"%d,%d,%d,%d\" ", xOffRc, y, xOffRc+insideWidth, y+totalHeight);
hPrintf("HREF=\"%s&g=%s&c=%s&l=%d&r=%d&db=%s&i=zoomInMore\" ",
hgcNameAndSettings(), tg->mapName, chromName, winStart, winEnd, database);
hPrintf("TITLE=\"zoomInMore\">\n");
- #endif//ndef IMAGEv2_UI
+ }
}
else
{
struct linkedFeatures *probe;