6e60e7d3ae54dab60eb8c7ad1af02441266729c3 kate Mon Aug 13 15:24:08 2018 -0700 Expanding interactDirectional to allow source or target offset display. refs #21109 diff --git src/hg/lib/interactUi.c src/hg/lib/interactUi.c index a3ca5e6..9a0988b 100644 --- src/hg/lib/interactUi.c +++ src/hg/lib/interactUi.c @@ -5,37 +5,40 @@ #include "cheapcgi.h" #include "cart.h" #include "hui.h" #include "trackDb.h" #include "interactUi.h" boolean isPopup = FALSE; boolean interactUiDirectional(struct trackDb *tdb) /* Determine if interactions are directional */ { return isNotEmpty(trackDbSetting(tdb, INTERACT_DIRECTIONAL)); } -boolean interactUiOffset(struct trackDb *tdb) -/* Determine if interactions should be displayed with source/targets offset horizontally. - * setting: interactDirectional offset */ +char *interactUiOffset(struct trackDb *tdb) +/* Determine whether to offset source or target (or neither if NULL) */ { char *directional = trackDbSetting(tdb, INTERACT_DIRECTIONAL); if (directional) - return sameString(INTERACT_OFFSET, firstWordInLine(directional)); + { + if (sameString(directional, INTERACT_OFFSET_TARGET) || + sameString(directional, INTERACT_OFFSET_SOURCE)) + return directional; + } return FALSE; } void interactUiMinScore(struct cart *cart, char *track, struct trackDb *tdb) /* Minimum score */ { char buffer[1024]; safef(buffer, sizeof buffer, "%s.%s", tdb->track, INTERACT_MINSCORE); int minScore = cartUsualInt(cart, buffer, 0); printf("Minimum score: "); cgiMakeIntVar(buffer, minScore, 0); } void interactUiTrackHeight(struct cart *cart, char *track, struct trackDb *tdb) /* Input box to change track height */