e7b2da51ba638fe7f6f4379c6c9470321ac0a88e
tdreszer
  Thu Dec 22 11:20:00 2011 -0800
Removed old ifdefs.  No functional change here.
diff --git src/hg/hgTracks/imageV2.c src/hg/hgTracks/imageV2.c
index 8505a07..daa7ae7 100644
--- src/hg/hgTracks/imageV2.c
+++ src/hg/hgTracks/imageV2.c
@@ -1223,35 +1223,31 @@
 imgBox->showPortal     = FALSE;
 //int oneThird = (chromEnd - chromStart)/3; // TODO: Currently defaulting to 1/3 of image width
 imgBox->portalStart    = chromStart;// + oneThird;
 imgBox->portalEnd      = chromEnd;// - oneThird;
 imgBox->portalWidth    = chromEnd - chromStart;
 imgBox->basesPerPixel  = ((double)imgBox->chromEnd - imgBox->chromStart)/(imgBox->width - imgBox->sideLabelWidth);
 return imgBox;
 }
 
 boolean imgBoxPortalDefine(struct imgBox *imgBox,int *chromStart,int *chromEnd,int *imgWidth,double imageMultiple)
 /* Defines the portal of the imgBox.  The portal is the initial viewable region when dragScroll is being used.
    the new chromStart,chromEnd and imgWidth are returned as OUTs, while the portal becomes the initial defined size
    returns TRUE if successfully defined as having a portal */
 {
 if( (int)imageMultiple == 0)
-#ifdef IMAGEv2_DRAG_SCROLL_SZ
     imageMultiple = IMAGEv2_DRAG_SCROLL_SZ;
-#else//ifndef IMAGEv2_DRAG_SCROLL_SZ
-    imageMultiple = 1;
-#endif//ndef IMAGEv2_DRAG_SCROLL_SZ
 
 imgBox->portalStart = imgBox->chromStart;
 imgBox->portalEnd   = imgBox->chromEnd;
 imgBox->portalWidth = imgBox->width - imgBox->sideLabelWidth;
 imgBox->showPortal  = FALSE; // Guilty until proven innocent
 
 int positionWidth = (int)((imgBox->portalEnd - imgBox->portalStart) * imageMultiple);
 *chromStart = imgBox->portalStart - (int)(((imageMultiple - 1)/2) * (imgBox->portalEnd - imgBox->portalStart));
 if( *chromStart < 0)
     *chromStart = 0;
 *chromEnd = *chromStart + positionWidth;
 struct chromInfo *chrInfo = hGetChromInfo(imgBox->db,imgBox->chrom);
 if(chrInfo == NULL)
     {
     *chromStart = imgBox->chromStart;
@@ -1744,34 +1740,32 @@
             offsetY += centerSlice->height;
             }
         }
     // Adjustment for portal
     if(imgBox->showPortal && imgBox->basesPerPixel > 0
     && (sliceType==stData || sliceType==stCenter))
         {
         offsetX += (imgBox->portalStart - imgBox->chromStart) / imgBox->basesPerPixel;
         width=imgBox->portalWidth;
         }
     hPrintf("  <div style='width:%dpx; height:%dpx;",width,height);
     if (sliceType == stCenter && imgTrack->centerLabelSeen == clNotSeen)
         hPrintf(" display:none;");
     hPrintf("' class='sliceDiv %s",sliceTypeToClass(slice->type));
 
-    #ifdef IMAGEv2_DRAG_SCROLL
     if(imgBox->showPortal && (sliceType==stData || sliceType==stCenter))
         hPrintf(" panDiv%s",(scrollHandle?" scroller":""));
-    #endif //def IMAGEv2_DRAG_SCROLL
     hPrintf("'>\n");
     }
 struct mapSet *map = sliceGetMap(slice,FALSE); // Could be the image map or slice specific
 if(map)
     useMap = imageMapDraw(map,name);
 else if(slice->link != NULL)
     {
     if (sameString(TITLE_BUT_NO_LINK,slice->link))
         { // This fake link ensures a mouse-over title is seen but not heard
         hPrintf("<A class='%s'",TITLE_BUT_NO_LINK);
         }
     else if(skipToSpaces(slice->link) != NULL)
         hPrintf("  <A HREF=%s",slice->link);
     else
         hPrintf("  <A HREF='%s'",slice->link);
@@ -1824,48 +1818,46 @@
     int offset = 0;
     if(imgBox->showSideLabel && imgBox->plusStrand)
         {
         struct imgSlice *slice = imgTrackSliceGetByType(imgBox->imgTracks,stData);
         if(slice)
             offset = (slice->offsetX * -1);  // This works because the ruler has a slice
          }
     hPrintf("<style type='text/css'>\n");
     if(offset != 0)
         hPrintf("td.tdData {background-image:url(\"%s\");background-repeat:repeat-y;background-position:%dpx;}\n",imgBox->bgImg->file,offset);
     else
         hPrintf("td.tdData {background-image:url(\"%s\");background-repeat:repeat-y;}\n",imgBox->bgImg->file);
     hPrintf("</style>\n");
     }
 
-#ifdef IMAGEv2_DRAG_SCROLL
 if(imgBox->showPortal)
     {
     // Let js code know what's up
     int chromSize = hChromSize(database, chromName);
     jsonHashAddNumber( jsonForClient,"chromStart",   1);
     jsonHashAddNumber( jsonForClient,"chromEnd",     chromSize);
     jsonHashAddBoolean(jsonForClient,"imgBoxPortal",       TRUE);
     jsonHashAddNumber( jsonForClient,"imgBoxWidth",        (imgBox->width - imgBox->sideLabelWidth));
     jsonHashAddNumber( jsonForClient,"imgBoxPortalStart",  imgBox->portalStart);
     jsonHashAddNumber( jsonForClient,"imgBoxPortalEnd",    imgBox->portalEnd);
     jsonHashAddNumber( jsonForClient,"imgBoxPortalWidth",  imgBox->portalWidth);
     jsonHashAddNumber( jsonForClient,"imgBoxLeftLabel",    (imgBox->plusStrand?imgBox->sideLabelWidth:0));
     jsonHashAddNumber( jsonForClient,"imgBoxPortalOffsetX",(long)((imgBox->portalStart - imgBox->chromStart) / imgBox->basesPerPixel));
     jsonHashAddDouble( jsonForClient,"imgBoxBasesPerPixel",imgBox->basesPerPixel);
     }
 else
-#endif//def IMAGEv2_DRAG_SCROLL
     jsonHashAddBoolean(jsonForClient,"imgBoxPortal",       FALSE);
 
 hPrintf("<TABLE id='imgTbl' border=0 cellspacing=0 cellpadding=0 BGCOLOR='%s'",COLOR_WHITE);//COLOR_RED); // RED to help find bugs
 hPrintf(" width=%d",imgBox->showPortal?(imgBox->portalWidth+imgBox->sideLabelWidth):imgBox->width);
 hPrintf(" class='tableWithDragAndDrop'");
 hPrintf(" style='border:1px solid blue;border-collapse:separate;'>\n");
 
 struct jsonHashElement *jsonTdbVars = newJsonHash(newHash(8));
 jsonTdbSettingsInit(jsonTdbVars);
 
 char *newLine = NEWLINE_TO_USE(cgiClientBrowser(NULL,NULL,NULL));
 struct imgTrack *imgTrack = imgBox->imgTracks;
 for(;imgTrack!=NULL;imgTrack=imgTrack->next)
     {
     char *trackName = (imgTrack->name != NULL ? imgTrack->name : imgTrack->tdb->track );
@@ -1883,35 +1875,31 @@
         safef(name, sizeof(name), "btn_%s", trackName);
         hPrintf(" <TD id='td_%s'%s>\n",name,(imgTrack->reorderable?" class='dragHandle'":""));
         sliceAndMapDraw(imgBox,imgTrack,stButton,name,FALSE);
         hPrintf("</TD>\n");
         // leftLabel
         safef(name,sizeof(name),"side_%s",trackName);
         if (imgTrack->reorderable)
             hPrintf(" <TD id='td_%s' class='dragHandle tdLeft' title='%s%sdrag to reorder'>\n",name,attributeEncode(imgTrack->tdb->longLabel),newLine);
         else
             hPrintf(" <TD id='td_%s' class='tdLeft'>\n",name);
         sliceAndMapDraw(imgBox,imgTrack,stSide,name,FALSE);
         hPrintf("</TD>\n");
         }
 
     // Main/Data image region
-#ifdef IMAGEv2_DRAG_SCROLL
     hPrintf(" <TD id='td_data_%s' title='click & drag to scroll; shift+click & drag to zoom' width=%d class='tdData'>\n", trackName, imgBox->width);
-#else///ifndef IMAGEv2_DRAG_SCROLL
-    hPrintf(" <TD id='td_data_%s' width=%d class='tdData'>\n", trackName, imgBox->width);
-#endif//ndef IMAGEv2_DRAG_SCROLL
     // centerLabel
     if(imgTrack->hasCenterLabel)
         {
         safef(name, sizeof(name), "center_%s", trackName);
         sliceAndMapDraw(imgBox,imgTrack,stCenter,name,TRUE);
         hPrintf("\n");
         }
     // data image
     safef(name, sizeof(name), "data_%s", trackName);
     sliceAndMapDraw(imgBox,imgTrack,stData,name,(imgTrack->order>0));
     hPrintf("</TD>\n");
 
     if(imgBox->showSideLabel && !imgTrack->plusStrand)
         {
         // rightLabel