src/hg/hgTracks/hgTracks.c 1.1624

1.1624 2010/02/12 21:07:35 tdreszer
Removed ifdef IMAGE_V2. This is now permenant. Also rearranged optional navigation links
Index: src/hg/hgTracks/hgTracks.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/hgTracks.c,v
retrieving revision 1.1623
retrieving revision 1.1624
diff -b -B -U 4 -r1.1623 -r1.1624
--- src/hg/hgTracks/hgTracks.c	9 Feb 2010 23:27:21 -0000	1.1623
+++ src/hg/hgTracks/hgTracks.c	12 Feb 2010 21:07:35 -0000	1.1624
@@ -4195,9 +4195,8 @@
     doNextPrevItem(TRUE, cgiUsualString("hgt.nextItem", NULL));
 else if (cgiVarExists("hgt.prevItem"))
     doNextPrevItem(FALSE, cgiUsualString("hgt.prevItem", NULL));
 
-#ifdef IMAGEv2_UI
 if(advancedJavascriptFeaturesEnabled(cart) && !psOutput)
     {
     // Start an imagebox (global for now to avoid huge rewrite of hgTracks)
     // Set up imgBox dimensions
@@ -4213,9 +4212,8 @@
         insideWidth = tl.picWidth-gfxBorder-insideX;
         }
     #endif//def IMAGEv2_DRAG_SCROLL
     }
-#endif//def IMAGEv2_UI
 /* Tell tracks to load their items. */
 for (track = trackList; track != NULL; track = track->next)
     {
     /* adjust track visibility based on supertrack just before load loop */
@@ -4422,37 +4420,38 @@
 /* Make chromsome ideogram gif and map. */
 makeChromIdeoImage(&trackList, psOutput, ideoTn);
 
 #ifdef USE_NAVIGATION_LINKS
-    hPrintf("<table style='font-size:small;width:%dpx'><tr align='center'>",min(tl.picWidth, 800));
+    hPrintf("<TABLE BORDER=0 CELLPADDING=0 width='%d'><tr style='font-size:small;'>\n",tl.picWidth);//min(tl.picWidth, 800));
     #ifndef IMAGEv2_DRAG_SCROLL
     //if(!advancedJavascriptFeaturesEnabled(cart))
         {
-        hPrintf("<td width='60'><a href='?hgt.left3=1' title='move 95&#37; to the left'>&lt;&lt;&lt;</a>\n");
-        hPrintf("<td width='50'><a href='?hgt.left2=1' title='move 47.5&#37; to the left'>&lt;&lt;</a>\n");
-        hPrintf("<td width='40'><a href='?hgt.left1=1' title='move 10&#37; to the left'>&lt;</a>\n");
-        hPrintf("<td width='50'>&nbsp;</td>\n");
+        hPrintf("<td width='40' align='left'><a href='?hgt.left3=1' title='move 95&#37; to the left'>&lt;&lt;&lt;</a>\n");
+        hPrintf("<td width='30' align='left'><a href='?hgt.left2=1' title='move 47.5&#37; to the left'>&lt;&lt;</a>\n");
+        hPrintf("<td width='20' align='left'><a href='?hgt.left1=1' title='move 10&#37; to the left'>&lt;</a>\n");
         }
     #endif//ndef IMAGEv2_DRAG_SCROLL
     if(!advancedJavascriptFeaturesEnabled(cart))
         {
-        hPrintf("<td width='60' ><a href='?hgt.in1=1' title='zoom out 1.5x'>&gt;&nbsp;&lt;</a>\n");
-        hPrintf("<td width='80' ><a href='?hgt.in2=1' title='zoom out 3x'>&gt;&gt;&nbsp;&lt;&lt;</a>\n");
-        hPrintf("<td width='100'><a href='?hgt.in3=1' title='zoom out 10x'>&gt;&gt;&gt;&nbsp;&lt;&lt;&lt;</a>\n");
-        hPrintf("<td width='50'>&nbsp;\n");
-        hPrintf("<td width='50'><a href='?hgt.inBase=1' title='zoom in to base range'>ACGT</a>\n");
-        hPrintf("<td width='50'>&nbsp;\n");
-        }
-    hPrintf("<td width='60' ><a href='?hgt.out1=1' title='zoom out 1.5x'>&lt;&nbsp;&gt;</a>\n");
-    hPrintf("<td width='80' ><a href='?hgt.out2=1' title='zoom out 3x'>&lt;&lt;&nbsp;&gt;&gt;</a>\n");
-    hPrintf("<td width='100'><a href='?hgt.out3=1' title='zoom out 10x'>&lt;&lt;&lt;&nbsp;&gt;&gt;&gt;</a>\n");
-    hPrintf("<td width='50'>&nbsp;\n");
+    #ifndef IMAGEv2_DRAG_SCROLL
+        hPrintf("<td>&nbsp;</td>\n"); // Without 'width=' this cell expand to table with, forcing other cells to the sides.
+    #endif//ndef IMAGEv2_DRAG_SCROLL
+        hPrintf("<td width='80' align='left'><a href='?hgt.in3=1' title='zoom out 10x'>&gt;&gt;&gt;&nbsp;&lt;&lt;&lt;</a>\n");
+        hPrintf("<td width='60' align='left'><a href='?hgt.in2=1' title='zoom out 3x'>&gt;&gt;&nbsp;&lt;&lt;</a>\n");
+        hPrintf("<td width='40' align='left'><a href='?hgt.in1=1' title='zoom out 1.5x'>&gt;&nbsp;&lt;</a>\n");
+        hPrintf("<td width='40' align='left'><a href='?hgt.inBase=1' title='zoom in to base range'><i>base</i></a>\n");
+        }
+    hPrintf("<td>&nbsp;</td>\n"); // Without 'width=' this cell expand to table with, forcing other cells to the sides.
+    hPrintf("<td width='40' align='right'><a href='?hgt.out1=1' title='zoom out 1.5x'>&lt;&nbsp;&gt;</a>\n");
+    hPrintf("<td width='60' align='right'><a href='?hgt.out2=1' title='zoom out 3x'>&lt;&lt;&nbsp;&gt;&gt;</a>\n");
+    hPrintf("<td width='80' align='right'><a href='?hgt.out3=1' title='zoom out 10x'>&lt;&lt;&lt;&nbsp;&gt;&gt;&gt;</a>\n");
     #ifndef IMAGEv2_DRAG_SCROLL
     //if(!advancedJavascriptFeaturesEnabled(cart))
         {
-        hPrintf("<td width='40'><a href='?hgt.right1=1' title='move 10&#37; to the right'>&gt;</a>\n");
-        hPrintf("<td width='50'><a href='?hgt.right2=1' title='move 47.5&#37; to the right'>&gt;&gt;</a>\n");
-        hPrintf("<td width='60'><a href='?hgt.right3=1' title='move 95&#37; to the right'>&gt;&gt;&gt;</a>\n");
+        hPrintf("<td>&nbsp;</td>\n"); // Without 'width=' this cell expand to table with, forcing other cells to the sides.
+        hPrintf("<td width='20' align='right'><a href='?hgt.right1=1' title='move 10&#37; to the right'>&gt;</a>\n");
+        hPrintf("<td width='30' align='right'><a href='?hgt.right2=1' title='move 47.5&#37; to the right'>&gt;&gt;</a>\n");
+        hPrintf("<td width='40' align='right'><a href='?hgt.right3=1' title='move 95&#37; to the right'>&gt;&gt;&gt;</a>\n");
         }
     #endif//ndef IMAGEv2_DRAG_SCROLL
     /* use button maker that determines padding, so we can share constants */
     hPrintf("</tr></table>\n");