f5bc011a1d5dd3daa3211c93eead19e8c7f50ce3 braney Thu Mar 16 16:53:32 2023 -0700 polishing up squishyPack for release diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c index ea33a08..4218f78 100644 --- src/hg/hgTracks/simpleTracks.c +++ src/hg/hgTracks/simpleTracks.c @@ -940,30 +940,32 @@ } else if (vis == tvFull || vis == tvPack || vis == tvSquish) vis = tvDense; dyStringPrintf(dy, "&%s=%s", encodedMapName, hStringFromTv(vis)); freeMem(encodedMapName); } } return dy; } boolean isWithCenterLabels(struct track *track) /* Cases: only TRUE when global withCenterLabels is TRUE * If track->tdb has a centerLabelDense setting, go with it. // * If composite child then no center labels in dense mode. */ { +if (strstr(track->track, "Squish")) + return FALSE; if (!withCenterLabels) { return FALSE; } if (track != NULL) { char *centerLabelsDense = trackDbSetting(track->tdb, "centerLabelsDense"); if (centerLabelsDense) { return sameWord(centerLabelsDense, "on"); } } return withCenterLabels; } @@ -4113,31 +4115,34 @@ return (withExonNumbers && exonNumbers && (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); - mapBoxHgcOrHgGene(hvg, start, end, x, y, width, height, tg->track, + char *trackName = tg->track; + if (tg->originalTrack != NULL) + trackName = tg->originalTrack; + mapBoxHgcOrHgGene(hvg, start, end, x, y, width, height, trackName, mapItemName, itemName, directUrl, withHgsid, NULL); } } void genericDrawNextItemStuff(struct track *tg, struct hvGfx *hvg, enum trackVisibility vis, struct slList *item, double scale, int x2, int x1, int textX, int y, int heightPer, Color color, boolean doButtons) /* After the item is drawn in genericDrawItems, draw next/prev item related */ /* buttons and the corresponding mapboxes. */ { int buttonW = heightPer-1 + 2*NEXT_ITEM_ARROW_BUFFER; int s = tg->itemStart(tg, item); int e = tg->itemEnd(tg, item); boolean rButton = FALSE; boolean lButton = FALSE; @@ -5059,31 +5064,34 @@ int x, int y, int width, int height) /* Draw the mouseOver (aka statusLine) text from the mouseOver field of lf * Fallback to itemName if there is no mouseOver field. * (derived from genericMapItem) */ { // Don't bother if we are imageV2 and a dense child. if (theImgBox && tg->limitedVis == tvDense && tdbIsCompositeChild(tg->tdb)) return; struct linkedFeatures *lf = item; char *newItemName = (isEmpty(lf->mouseOver)) ? itemName: lf->mouseOver; // copied from genericMapItem char *directUrl = trackDbSetting(tg->tdb, "directUrl"); boolean withHgsid = (trackDbSetting(tg->tdb, "hgsid") != NULL); -mapBoxHgcOrHgGene(hvg, start, end, x, y, width, height, tg->track, +char *trackName = tg->track; +if (tg->originalTrack != NULL) + trackName = tg->originalTrack; +mapBoxHgcOrHgGene(hvg, start, end, x, y, width, height, trackName, mapItemName, newItemName, directUrl, withHgsid, NULL); } void linkedFeaturesMethods(struct track *tg) /* Fill in track methods for linked features. */ { tg->freeItems = linkedFeaturesFreeItems; tg->drawItems = linkedFeaturesDraw; tg->drawItemAt = linkedFeaturesDrawAt; tg->itemName = linkedFeaturesName; tg->mapItemName = linkedFeaturesName; tg->mapItem = linkedFeaturesMapItem; tg->totalHeight = tgFixedTotalHeightNoOverflow; tg->itemHeight = tgFixedItemHeight; tg->itemStart = linkedFeaturesItemStart;