77663f3ad7d665b98a3fea4c94c1429e92928431 hiram Fri Sep 19 13:00:13 2014 -0700 allow hg.conf override of 5000 pixel wide limit refs #10411 diff --git src/hg/lib/trackLayout.c src/hg/lib/trackLayout.c index 4a7da2e..4b774b6 100644 --- src/hg/lib/trackLayout.c +++ src/hg/lib/trackLayout.c @@ -4,39 +4,45 @@ /* Copyright (C) 2014 The Regents of the University of California * See README in this or parent directory for licensing information. */ #include "common.h" #include "memgfx.h" #include "cart.h" #include "hgConfig.h" #include "hCommon.h" #include "trackLayout.h" void trackLayoutSetPicWidth(struct trackLayout *tl, char *s) /* Set pixel width from ascii string. */ { +int maxWidth = MAX_DISPLAY_PIXEL_WIDTH; +char *maxDisplayPixelWidth = cfgOptionDefault("maxDisplayPixelWidth", NULL); + +if (isNotEmpty(maxDisplayPixelWidth)) + maxWidth = sqlUnsigned(maxDisplayPixelWidth); + if (s != NULL && isdigit(s[0])) { tl->picWidth = atoi(s); #ifdef LOWELAB if (tl->picWidth > 60000) tl->picWidth = 60000; #else - if (tl->picWidth > 5000) - tl->picWidth = 5000; + if (tl->picWidth > maxWidth) + tl->picWidth = maxWidth; #endif if (tl->picWidth < 320) tl->picWidth = 320; } tl->trackWidth = tl->picWidth - tl->leftLabelWidth; } boolean trackLayoutInclFontExtras() /* Check if fonts.extra is set to use "yes" in the config. This enables * extra fonts and related options that are not part of the public browser */ { static boolean first = TRUE; static boolean enabled = FALSE; if (first) {