db521cd9c64d7adb1506c50c080d04f9b2d2febf braney Wed Feb 7 12:37:17 2024 -0800 do all the exon numbering stuff in squish as well as pack and full diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c index 01b75c9..33ba9df 100644 --- src/hg/hgTracks/simpleTracks.c +++ src/hg/hgTracks/simpleTracks.c @@ -4352,31 +4352,31 @@ /* Check to see if we draw exon and intron maps labeling their number. */ { if (tg->tdb) { char *type = tg->tdb->type; if (sameString(type, "interact") || sameString(type, "bigInteract")) return FALSE; } char *defVal = "off"; char *type = tg->tdb->type; if (startsWith("bigGenePred", type) || startsWith("genePred", type)) defVal = "on"; boolean exonNumbers = sameString(trackDbSettingOrDefault(tg->tdb, "exonNumbers", defVal), "on"); -return (withExonNumbers && exonNumbers && (vis==tvFull || vis==tvPack) && (winEnd - winStart < 400000) +return (withExonNumbers && exonNumbers && (vis==tvSquish || vis==tvFull || vis==tvPack) && (winEnd - winStart < 400000) && (tg->nextPrevExon==linkedFeaturesNextPrevItem)); } void genericMapItem(struct track *tg, struct hvGfx *hvg, void *item, char *itemName, char *mapItemName, int start, int end, int x, int y, int width, int height) /* This is meant to be used by genericDrawItems to set to tg->mapItem in */ /* case tg->mapItem isn't set to anything already. */ { // Don't bother if we are imageV2 and a dense child. if (!theImgBox || tg->limitedVis != tvDense || !tdbIsCompositeChild(tg->tdb)) { char *directUrl = trackDbSetting(tg->tdb, "directUrl"); boolean withHgsid = (trackDbSetting(tg->tdb, "hgsid") != NULL); char *trackName = tg->track; @@ -4422,31 +4422,31 @@ } /* Draw the actual triangles. These are always at the edge of the window. */ if (lButton) { hvGfxNextItemButton(hvg, insideX + NEXT_ITEM_ARROW_BUFFER, y, heightPer-1, heightPer-1, color, MG_WHITE, FALSE); } if (rButton) { hvGfxNextItemButton(hvg, insideX + insideWidth - NEXT_ITEM_ARROW_BUFFER - heightPer, y, heightPer-1, heightPer-1, color, MG_WHITE, TRUE); } boolean compat = exonNumberMapsCompatible(tg, vis); -if (vis == tvPack || (vis == tvFull && isTypeBedLike(tg))) +if (vis == tvSquish || vis == tvPack || (vis == tvFull && isTypeBedLike(tg))) { int w = x2-textX; if (lButton) { // if left-button, the label will be on far left, split out a map just for that label. tg->mapItem(tg, hvg, item, tg->itemName(tg, item), tg->mapItemName(tg, item), s, e, textX, y, insideX-textX, heightPer); textX = insideX + buttonW; // continue on the right side of the left exon button w = x2-textX; } if (rButton) { w -= buttonW; } if (compat)