ebb119f63d024ea706a6922adf67bb9956d5f049 kate Tue Sep 3 16:33:52 2019 -0700 More fixes for multi-region (cross-chrom and non-cluster mode). refs #22422 diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index 83f87d9..9b9cda0 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -4539,47 +4539,61 @@ || sameWord(type, "bigInteract") || sameWord(type, "bigLolly") //|| track->loadItems == loadSimpleBed //|| track->bedSize >= 3 // should pick up several ENCODE BED-Plus types. ) && track->canPack ) { return TRUE; } return FALSE; } boolean isTypeUseItemNameAsKey(struct track *track) -/* Check if track type is like expRatio and key is just item name. */ +/* Check if track type is like expRatio and key is just item name, to link across multi regions */ { char *typeLine = track->tdb->type, *words[8], *type; int wordCount; if (typeLine == NULL) return FALSE; wordCount = chopLine(cloneString(typeLine), words); if (wordCount <= 0) return FALSE; type = words[0]; if (sameWord(type, "expRatio")) { // track is like expRatio, needs one row per item return TRUE; } +return FALSE; +} + +boolean isTypeUseMapItemNameAsKey(struct track *track) +/* Check if track type is like interact and uses map item name to link across multi regions */ +{ +char *typeLine = track->tdb->type, *words[8], *type; +int wordCount; +if (typeLine == NULL) + return FALSE; +wordCount = chopLine(cloneString(typeLine), words); +if (wordCount <= 0) + return FALSE; +type = words[0]; if (sameWord(type, "interact") || sameWord(type, "bigInteract")) - return interactIsClusterMode(track); + return TRUE; return FALSE; } void setFlatTrackMaxHeight(struct flatTracks *flatTrack, int fontHeight) /* for each flatTrack, figure out maximum height needed from all windows */ { struct track *track = flatTrack->track; int maxHeight = 0; struct track *winTrack; struct window *window; for (window=windows, winTrack=track; window; window=window->next, winTrack=winTrack->nextWindow) { setGlobalsFromWindow(window); int trackHeight = trackPlusLabelHeight(winTrack, fontHeight);