12d023ae3337d8909508d543d9d78c99758b25c5 braney Mon Sep 2 10:29:34 2019 -0700 add cumulative auto-scaling to composites and views. Remove REMOTE_TRACK_AJAX_CALLBACK stuff that was apparently an experiment from ten years ago. diff --git src/hg/inc/trackDb.h src/hg/inc/trackDb.h index 0cdfe97..f824c5a 100644 --- src/hg/inc/trackDb.h +++ src/hg/inc/trackDb.h @@ -17,30 +17,36 @@ #endif #ifndef LINEFILE_H #include "linefile.h" #endif #ifndef CART_H #include "cart.h" #endif #define TRACKDB_NUM_COLS 21 // Forward definitions struct tdbExtras; +// A structure to keep track of our min and max values if we're a wig +struct minMax +{ + double min, max; +}; + struct trackDb /* This describes an annotation track. */ { struct trackDb *next; /* Next in singly linked list. Next sibling in tree. */ char *track; /* Symbolic ID of Track - used in cart. Is tableName in database historically. */ char *table; /* Symbolic ID of Table - used in database. Same as track usually. */ char *shortLabel; /* Short label displayed on left */ char *type; /* Track type: bed, psl, genePred, etc. */ char *longLabel; /* Long label displayed in middle */ unsigned char visibility; /* 0=hide, 1=dense, 2=full, 3=pack, 4=squish */ float priority; /* 0-100 - where to position. 0 is top */ unsigned char colorR; /* Color red component 0-255 */ unsigned char colorG; /* Color green component 0-255 */ unsigned char colorB; /* Color blue component 0-255 */ unsigned char altColorR; /* Light color red component 0-255 */ @@ -580,30 +586,33 @@ struct tdbExtras #define TDB_EXTRAS_EMPTY_STATE 666 // Struct for misc. data collected/calculated during CGI track setup that are cached for later use. // These extras are primarily used in hgTracks & hgTrackUi but can be used and expanded as needed. // CGI developers are encouraged to add to this structure for their own needs. { int fourState; // hgTrackUi subtracks use 4 state checkboxes (checked/un by enabled/dis) boolean reshapedComposite; // hgTracks should not "reshape" composites more than once. struct mdbObj *mdb; // several CGIs need repeated access to a tracks metadata struct _membersForAll *membersForAll; // hgTrackUi composites collect all view/dimension info struct _membership *membership; // hgTrackUi subtracks have individual membership info // Developer: please add your useful data that is costly to calculate/retrieve more than once struct hash *membersHash; + + // keep track of our children's min and max if we're scaling over all of them + struct minMax *minMax; }; void tdbExtrasFree(struct tdbExtras **pTdbExtras); // Frees the tdbExtras structure int tdbExtrasFourState(struct trackDb *tdb); // Returns subtrack four state if known, else TDB_EXTRAS_EMPTY_STATE void tdbExtrasFourStateSet(struct trackDb *tdb,int fourState); // Sets subtrack four state boolean tdbExtrasReshapedComposite(struct trackDb *tdb); // Returns TRUE if composite has been declared as reshaped, else FALSE. void tdbExtrasReshapedCompositeSet(struct trackDb *tdb);