src/hg/hgTracks/hgTracks.c 1.1579

1.1579 2009/06/29 18:14:46 tdreszer
imageV2 should now work with reverse.
Index: src/hg/hgTracks/hgTracks.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/hgTracks.c,v
retrieving revision 1.1578
retrieving revision 1.1579
diff -b -B -U 4 -r1.1578 -r1.1579
--- src/hg/hgTracks/hgTracks.c	27 Jun 2009 20:12:07 -0000	1.1578
+++ src/hg/hgTracks/hgTracks.c	29 Jun 2009 18:14:46 -0000	1.1579
@@ -1708,12 +1708,12 @@
 #ifdef IMAGEv2_UI
 if (withLeftLabels)
     {
     sideSliceWidth   = leftLabelWidth + 2;   // Just being explicit
-    sideSliceOffsetX = 0;                        // FIXME: Reverse?
+    sideSliceOffsetX = (revCmplDisp?(tl.picWidth - sideSliceWidth): 0);
     }
 dataSliceWidth   = tl.picWidth - sideSliceWidth;
-dataSliceOffsetX = sideSliceWidth;               // FIXME: Reverse?
+dataSliceOffsetX = (revCmplDisp?0:sideSliceWidth);
 #endif//def IMAGEv2_UI
 
 /* Draw mini-buttons. */
 if (withLeftLabels && psOutput == NULL)
@@ -2210,9 +2210,9 @@
             // This will need to change to allow drag and drop.  Until then the subtrack center labels will drag scroll while the composte will not.
             // But as soon as subtracks are individual image tracks: problems with buttons, left labels, center labels, drag and drop, etc.
             sliceHeight      = trackPlusLabelHeight(track, fontHeight) - (isWithCenterLabels(track) ? fontHeight : 0);
             sliceOffsetY     = y + (isWithCenterLabels(track) ? fontHeight : 0);
-            char var[128];
+            char var[128];     // FIXME: The cart var should update the tracks and the sort should be on the tracks.  This would allow printing the image
             safef(var,sizeof(var),"%s_%s",track->tdb->tableName,IMG_ORDER_VAR);
             int order = cartUsualInt(cart, var,IMG_ANYORDER);
             //warn("Found:%s has order:%d",var,order);
             curImgTrack = imgBoxTrackUpdateOrAdd(theImgBox,track->tdb,NULL,track->limitedVis,isWithCenterLabels(track),order);