f8bb21eb238221c0bc2c819d7fa7cffa6f1c9335 braney Mon Jun 1 15:59:57 2015 -0700 add left label for snakes in pack and dense modes (no redmine) diff --git src/hg/hgTracks/snakeTrack.c src/hg/hgTracks/snakeTrack.c index 1f12abb..13b3ac7 100644 --- src/hg/hgTracks/snakeTrack.c +++ src/hg/hgTracks/snakeTrack.c @@ -1337,31 +1337,39 @@ } errCatchEnd(errCatch); if (errCatch->gotError) { tg->networkErrMsg = cloneString(errCatch->message->string); tg->drawItems = bigDrawWarning; tg->totalHeight = bigWarnTotalHeight; } errCatchFree(&errCatch); } void halSnakeDrawLeftLabels(struct track *tg, int seqStart, int seqEnd, struct hvGfx *hvg, int xOff, int yOff, int width, int height, boolean withCenterLabels, MgFont *font, Color color, enum trackVisibility vis) +/* Draw left label (shortLabel) in pack and dense modes. */ { +if ((vis == tvDense) || (vis == tvPack)) + { + hvGfxSetClip(hvgSide, leftLabelX, yOff + tg->lineHeight, insideWidth, tg->height); + hvGfxTextRight(hvgSide, leftLabelX, yOff + tg->lineHeight, leftLabelWidth-1, tg->lineHeight, + color, font, tg->shortLabel); + hvGfxUnclip(hvgSide); + } } void halSnakeMethods(struct track *tg, struct trackDb *tdb, int wordCount, char *words[]) { linkedFeaturesMethods(tg); tg->canPack = tdb->canPack = TRUE; tg->loadItems = halSnakeLoadItems; tg->drawItems = snakeDraw; tg->mapItemName = lfMapNameFromExtra; tg->subType = lfSubChain; //tg->extraUiData = (void *) chainCart; tg->totalHeight = snakeHeight; tg->drawLeftLabels = halSnakeDrawLeftLabels;