src/hg/lib/hui.c 1.237

1.237 2009/09/18 20:05:09 braney
allow alwaysZero to be set in trackDb, set to off by default
Index: src/hg/lib/hui.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/hui.c,v
retrieving revision 1.236
retrieving revision 1.237
diff -b -B -U 4 -r1.236 -r1.237
--- src/hg/lib/hui.c	8 Sep 2009 21:09:23 -0000	1.236
+++ src/hg/lib/hui.c	18 Sep 2009 20:05:09 -0000	1.237
@@ -1394,10 +1394,10 @@
 	curVal);
 }
 
 static char *wiggleAlwaysZeroOptions[] = {
-    "ON",
-    "OFF"
+    "OFF",
+    "ON"
     };
 
 enum wiggleAlwaysZeroEnum wiggleAlwaysZeroToEnum(char *string)
 /* Convert from string to enum representation. */
@@ -1407,8 +1407,16 @@
    errAbort("hui::wiggleAlwaysZeroToEnum() - Unknown option %s", string);
 return x;
 }
 
+void wiggleAlwaysZeroDropDown(char *var, char *curVal)
+/* Make drop down of options. */
+{
+cgiMakeDropList(var, wiggleAlwaysZeroOptions, 
+    ArraySize(wiggleAlwaysZeroOptions), curVal);
+}
+
+
 /****** Options for the wiggle track horizontal grid lines *******/
 
 static char *wiggleGridOptions[] = {
     "ON",
@@ -3392,9 +3400,9 @@
 snprintf(option, sizeof(option), "%s.%s", name, AUTOSCALE );
 wiggleScaleDropDown(option, autoScale);
 snprintf(option, sizeof(option), "%s.%s", name, ALWAYSZERO);
 printf("Always include zero:&nbsp");
-wiggleGridDropDown(option, alwaysZero);
+wiggleAlwaysZeroDropDown(option, alwaysZero);
 puts("</TD></TR>");
 
 printf("<TR valign=center><th align=right>Windowing function:</th><td align=left>");
 snprintf(option, sizeof(option), "%s.%s", name, WINDOWINGFUNCTION );