6e0d16475a09c3b72bd69f52f871671d8b1fee5d max Thu Jan 22 16:41:30 2026 -0800 allowing switching off the left side area, refs #36997 diff --git src/hg/cgilib/trackLayout.c src/hg/cgilib/trackLayout.c index 44c6d88f32d..28f40eb4dd1 100644 --- src/hg/cgilib/trackLayout.c +++ src/hg/cgilib/trackLayout.c @@ -77,26 +77,34 @@ else tl->textFont = cartUsualString(cart, textFontVar, "Helvetica"); tl->textSize = mgFontSizeBackwardsCompatible(cartUsualString(cart, textSizeVar, cfgOptionDefault(textSizeVar,"small"))); MgFont *font = mgFontForSizeAndStyle(tl->textSize, fontType); tl->font = font; tl->mWidth = mgFontStringWidth(font, "M"); tl->nWidth = mgFontStringWidth(font, "n"); tl->fontHeight = mgFontLineHeight(font); tl->barbHeight = tl->fontHeight/4; tl->barbSpacing = (tl->fontHeight+1)/2; tl->picWidth = hgDefaultPixWidth; trackLayoutSetPicWidth(tl, cartOptionalString(cart, "pix")); // label width, but don't exceed 1/2 of image tl->leftLabelWidthChars = cartUsualInt(cart, leftLabelWidthVar, leftLabelWidthDefaultChars); +if (tl->leftLabelWidthChars == -1) // special case for IGV, so you can switch off the left label bar entirely + { + tl->leftLabelWidthChars = 0; + tl->leftLabelWidth = 0; + } +else + { if (tl->leftLabelWidthChars < 2) tl->leftLabelWidthChars = leftLabelWidthDefaultChars; tl->leftLabelWidth = tl->leftLabelWidthChars*tl->nWidth + trackTabWidth + 3; int maxLabelWidth = 0.5*tl->picWidth; if (tl->leftLabelWidth > maxLabelWidth) { // overflow, force to 1/2 width tl->leftLabelWidthChars = maxLabelWidth/tl->nWidth; tl->leftLabelWidth = tl->leftLabelWidthChars * tl->nWidth; } } +}