8ed2d68b3774dcfe96b43cb0d60ed36ca84009bd
tdreszer
  Fri Jul 29 14:59:06 2011 -0700
Integrate my dragScroll with Larry's new json hash code.
diff --git src/hg/hgTracks/imageV2.h src/hg/hgTracks/imageV2.h
index e59c434..0c92d7e 100644
--- src/hg/hgTracks/imageV2.h
+++ src/hg/hgTracks/imageV2.h
@@ -1,51 +1,41 @@
 /* imageV2 - API for creating the image V2 features. */
 
 #ifndef IMAGEV2_H
 #define IMAGEV2_H
 
-// UNCOMMENT
-//   CONTEXT_MENU to allow right-click funtionality
-//   IMAGEv2_DRAG_SCROLL and IMAGEv2_DRAG_SCROLL_SZ to allow dragScroll
-//   USE_NAVIGATION_LINKS to use navigation links by image, rather than buttons at top
-
-// UNCOMMENT CONTEXT_MENU to allow right-click funtionality
-#define CONTEXT_MENU
+// set IN_PLACE_UPDATE 1 to update the hgTracks image in-place in the client.
+#define IN_PLACE_UPDATE  0
 
 //  UNCOMMENT IMAGEv2_DRAG_SCROLL and IMAGEv2_DRAG_SCROLL_SZ to allow dragScroll
-//  NOTE: dragScroll not working in SZ=1 (1x) yet, because haven't done ajax fetch when dragged beyond image dimansions.
-//        Still, set IMAGEv2_DRAG_SCROLL_SZ > 1 (3=3x) to get limited dragScroll functionality
+//  NOTE: 1x should work fine. Set IMAGEv2_DRAG_SCROLL_SZ > 1 (3=3x) to see hidden image while dragging.
+//        Problems with >1x: nextExon and nextItem arrows not addressed.  Dynamic resize occasionally fails.
 //#define IMAGEv2_DRAG_SCROLL
-//#define IMAGEv2_DRAG_SCROLL_SZ 3
+//#define IMAGEv2_DRAG_SCROLL_SZ 1
 
 #if defined(IMAGEv2_DRAG_SCROLL_SZ) && (IMAGEv2_DRAG_SCROLL_SZ > 1)
     #define IMAGEv2_SHORT_MAPITEMS
 #endif// defined(IMAGEv2_DRAG_SCROLL_SZ) && (IMAGEv2_DRAG_SCROLL_SZ > 1)
 
+// CURRENT PROBLEMS with dragScroll > 1X:
+// o Dynamic height for data/label based on image map currently works EXCEPT, occasionally does not resize.  Consider resize while dragging!
+// o next item feature '>>' arrows should check if items are in the wings
+// o next exon feature '>>' arrows are only seen in the wings and only look belond the wings
+
 // UNCOMMENT  USE_NAVIGATION_LINKS for so far experimental UI changes to replace buttons at top with more streamlined links
 //#define USE_NAVIGATION_LINKS
 
-#define IN_PLACE_UPDATE  0 // update the hgTracks image in-place in the client (currently turned off everywhere except for larrym's tree).
-
-// CURRENT PROBLEMS:
-// o FIXED: some map items span both sideLabel and data!!
-// o subrtacks should be dragReorderable!!!  Make them individual imgTracks
-// o centerlabel next feature '>>' arrows are scrolled off screen: fix when centerlabels are small and don't scroll
-// o subtrack center labels currently scroll with portal: fixed with subtracks being individual imgTracks
-// o image should be clear and background image should contain stripes
-// o Dynamic height for data/label based on image map currently in portal: DONE for packed, but full map items span all of data slice!
-
 extern struct imgBox   *theImgBox;   // Make this global for now to avoid huge rewrite
 //extern struct image    *theOneImg;   // Make this global for now to avoid huge rewrite
 extern struct imgTrack *curImgTrack; // Make this global for now to avoid huge rewrite
 //extern struct imgSlice *curSlice;    // Make this global for now to avoid huge rewrite
 //extern struct mapSet   *curMap;      // Make this global for now to avoid huge rewrite
 //extern struct mapItem  *curMapItem;  // Make this global for now to avoid huge rewrite
 
 /////////////////////////
 // FLAT TRACKS
 // A simplistic way of flattening the track list before building the image
 // NOTE: Strategy is NOT to use imgBox->imgTracks, since this should be independednt of imageV2
 //       These should probably be moved to hgTracks.h
 /////////////////////////
 struct flatTracks // List of tracks in image, flattened to promote subtracks
     {