15c582a98aceed3f49165b6c0105fa481059307f
braney
  Wed Feb 13 11:59:59 2019 -0800
distinguish between zero items and maxItems #21988

diff --git src/hg/hgTracks/interactTrack.c src/hg/hgTracks/interactTrack.c
index 2efc300..43fbc96 100644
--- src/hg/hgTracks/interactTrack.c
+++ src/hg/hgTracks/interactTrack.c
@@ -53,36 +53,34 @@
 return (s >= winStart) && (s < winEnd);
 }
 
 boolean interactTargetInWindow(struct interact *inter)
 /* True if midpoint of target is on screen */
 {
 unsigned t = interactRegionCenter(inter->targetStart, inter->targetEnd);
 return (t >= winStart) && (t < winEnd);
 }
 
 static void loadAndFilterItems(struct track *tg)
 /* Load all interact items in region */
 {
 loadSimpleBedWithLoader(tg, (bedItemLoader)interactLoadAndValidate);
 
-if (slCount(tg->items) == 0 && tg->limitedVisSet)
+// if the summary is filled in then the number of items in the region is greater than maxItems.
+if (tg->summary != NULL)
     {
     // too many items to display
-    // borrowed behaviors in bamTrack and vcfTrack
-    // TODO BRANEY: make this behavior generic for bigBeds
-    // (bigBedSelectRange)
     tg->drawItems = bigDrawWarning;
     tg->networkErrMsg = "Too many items in display (zoom in)"; 
     tg->totalHeight = bigWarnTotalHeight;
     return;
     }
 
 // filters
 struct interact *inter, *next, *filteredItems = NULL;
 int count = slCount(tg->items);
 
 // exclude if missing endpoint(s) in window
 char *endsVisible = cartUsualStringClosestToHome(cart, tg->tdb, FALSE,
                             INTERACT_ENDS_VISIBLE, INTERACT_ENDS_VISIBLE_DEFAULT);
 char *scoreFilter = cartOrTdbString(cart, tg->tdb, "scoreFilter", NULL);
 int minScore = 0;