src/hg/hgTracks/cytoBandTrack.c 1.10
1.10 2009/09/14 15:33:18 tdreszer
Make chrom ideo map no longer directly clickable, as per Jim's plan. Instead, by setting class=cytoBand, javascript will control clicking.
Index: src/hg/hgTracks/cytoBandTrack.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/cytoBandTrack.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -b -B -U 4 -r1.9 -r1.10
--- src/hg/hgTracks/cytoBandTrack.c 3 Sep 2008 19:19:02 -0000 1.9
+++ src/hg/hgTracks/cytoBandTrack.c 14 Sep 2009 15:33:18 -0000 1.10
@@ -191,9 +191,22 @@
int x, int y, int width, int height)
/* Print out a box to jump to band in browser window .*/
{
struct cytoBand *cb = item;
+#define IDEO_CLICK_SAME_SIZE
+#ifdef IDEO_CLICK_SAME_SIZE
+x = hvGfxAdjXW(hvg, x, width);
+
+ hPrintf("<AREA SHAPE=RECT COORDS=\"%d,%d,%d,%d\" ", x, y, x+width, y+height);
+ hPrintf("onclick='return false;' ");
+ hPrintf("HREF=\"#\" class='cytoBand'");
+ //hPrintf("HREF=\"%s?position=%s:%d-%d\"",hgTracksName(), cb->chrom, cb->chromStart+1, cb->chromEnd);
+ if (cb->name != NULL)
+ mapStatusMessage("%s %s:%d-%d", cb->name,cb->chrom, cb->chromStart, cb->chromEnd);
+ hPrintf(">\n");
+#else//ifndef IDEO_CLICK_SAME_SIZE
mapBoxJumpTo(hvg, x, y, width, height, cb->chrom, cb->chromStart, cb->chromEnd, cb->name);
+#endif//ndef IDEO_CLICK_SAME_SIZE
}
int cytoBandIdeoTotalHeight(struct track *tg, enum trackVisibility vis)
/* Return the (nonstandard) height of the cytoBandIdeo track. */