4e5b41a3d4c933bffb2958c9b34f925bab023179 kate Tue Dec 12 13:07:26 2017 -0800 Suppress labels on interchromosomal items if any on screen would overlap. Maybe later try packing, but this could be tricky. refs #17512 diff --git src/hg/lib/longRange.c src/hg/lib/longRange.c index 171c576..2637527 100644 --- src/hg/lib/longRange.c +++ src/hg/lib/longRange.c @@ -106,15 +106,24 @@ else { longRange->s = center; longRange->sw = thisWidth; longRange->sChrom = beds->chrom; longRange->e = otherCenter; longRange->ew = otherWidth; longRange->eChrom = otherChrom; } unsigned longRangeWidth = longRange->e - longRange->s; if (sameString(longRange->eChrom,longRange->sChrom) && ( longRangeWidth > *maxWidth)) *maxWidth = longRangeWidth; } return longRangeList; } + +int longRangeCmp(const void *va, const void *vb) +/* Compare based on coord position of s field */ +{ +const struct longRange *a = *((struct longRange **)va); +const struct longRange *b = *((struct longRange **)vb); +return (a->s - b->s); +} +