147794f00a80409a41e2fee989218a97bb67b99a
angie
  Fri Apr 1 11:11:29 2011 -0700
Bugs #3475, #3476 (hgTracks map links messed up for SNPs, omimGene):These were side-effects of my commit a8d97808 Mar. 11, in which I
enabled next-prev-exon for all simple beds (which, because they don't
have exons/blocks, just means zap-to-edge), instead of only for dbVar
where it was requested.  It turns out that way too many bed-based
tracks with custom drawItems and/or drawItemAt methods are missing
something necessary for the nextItem stuff to work.  In this fix,
instead of hooking up zap-to-edge for all simple bed, I hook it up
only to GVF (dbVar/ISCA).

diff --git src/hg/hgTracks/hgTracks.h src/hg/hgTracks/hgTracks.h
index 1b2d51f..5950efa 100644
--- src/hg/hgTracks/hgTracks.h
+++ src/hg/hgTracks/hgTracks.h
@@ -618,30 +618,36 @@
 void bedDrawSimple(struct track *tg, int seqStart, int seqEnd,
         struct hvGfx *hvg, int xOff, int yOff, int width,
         MgFont *font, Color color, enum trackVisibility vis);
 /* Draw simple Bed items. */
 
 typedef struct slList *(*ItemLoader)(char **row);
 
 void bedLoadItemByQuery(struct track *tg, char *table,
 			char *query, ItemLoader loader);
 /* Generic tg->item loader. If query is NULL use generic
  hRangeQuery(). */
 
 void bedLoadItem(struct track *tg, char *table, ItemLoader loader);
 /* Generic tg->item loader. */
 
+void simpleBedNextPrevEdge(struct track *tg, struct hvGfx *hvg, void *item, int x, int y, int w,
+			   int h, boolean next);
+/* Like linkedFeaturesNextPrevItem, but for simple bed which has no block structure so
+ * this simply zaps us to the right/left edge of the feature.  Arrows have already been
+ * drawn; here we figure out coords and draw a mapBox. */
+
 void loadLinkedFeaturesWithLoaders(struct track *tg, struct slList *(*itemLoader)(char **row),
 				   struct linkedFeatures *(*lfFromWhatever)(struct slList *item),
 				   char *scoreColumn, char *moreWhere, boolean (*itemFilter)(struct slList *item));
 /* Make a linkedFeatures loader by providing three functions: (1) a regular */
 /* item loader found in all autoSql modules, (2) a custom myStruct->linkedFeatures */
 /* translating function, and (3) a function to free the thing loaded in (1). */
 
 struct linkedFeatures *bedMungToLinkedFeatures(struct bed **pBed, struct trackDb *tdb,
 	int fieldCount, int scoreMin, int scoreMax, boolean useItemRgb);
 /* Convert bed to a linkedFeature, destroying bed in the process. */
 
 struct bigBedInterval *bigBedSelectRange(struct track *track,
 	char *chrom, int start, int end, struct lm *lm);
 /* Return list of intervals in range. */