3b54c6dd6383c8d749d10b59eae93ef5693efdcd
larrym
  Fri Jul 29 20:13:30 2011 -0700
add some comments
diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js
index 7d1c735..ca496ab 100644
--- src/hg/js/hgTracks.js
+++ src/hg/js/hgTracks.js
@@ -10,31 +10,31 @@
 var imgBoxPortal = false;
 var blockUseMap = false;
 var mapItems;
 var trackImg;               // jQuery element for the track image
 var trackImgTbl;            // jQuery element used for image table under imageV2
 var imgAreaSelect;          // jQuery element used for imgAreaSelect
 var originalImgTitle;
 var autoHideSetting = true; // Current state of imgAreaSelect autoHide setting
 var selectedMenuItem;       // currently choosen context menu item (via context menu).
 var browser;                // browser ("msie", "safari" etc.)
 var mapIsUpdateable = true;
 var currentMapItem;
 var floatingMenuItem;
 var visibilityStrsOrder = new Array("hide", "dense", "full", "pack", "squish");     // map browser numeric visibility codes to strings
 var supportZoomCodon = false;  // turn on experimental zoom-to-codon functionality (currently only on in larrym's tree).
-var inPlaceUpdate = false;     // modified based on value of hgTracks.inPlaceUpdate
+var inPlaceUpdate = false;     // modified based on value of hgTracks.inPlaceUpdate and mapIsUpdateable
 
 /* Data passed in from CGI via the hgTracks object:
  * 
  * string chromName           // current chromosome
  * int winStart               // genomic start coordinate (0-based, half-open)
  * int winEnd                 // genomic end coordinate
  * int newWinWidth            // new width if user clicks on the top ruler (in bps)
  * boolean dragSelection      // true if we should allow drag and select
  * boolean revCmplDisp        // true if we are in reverse display
  * int insideX                // width of side-bar (in pixels)
  * int rulerClickHeight       // height of ruler (in pixels)
  */
 
 function initVars(img)
 {
@@ -2530,30 +2530,31 @@
 // this.cmd can be used to figure out which menu item triggered this.
 // this.id == appropriate track if we are retrieving just a single track.
 
     // update local hgTracks.trackDb to reflect possible side-effects of ajax request.
     var json = scrapeVariable(response, "hgTracks");
     if(json == undefined) {
         showWarning("hgTracks object is missing from the response");
     } else {
         if(this.id != null) {
             if(json.trackDb[this.id]) {
                 var visibility = visibilityStrsOrder[json.trackDb[this.id].visibility];
                 var limitedVis;
                 if(json.trackDb[this.id].limitedVis)
                     limitedVis = visibilityStrsOrder[json.trackDb[this.id].limitedVis];
                 if(this.newVisibility && limitedVis && this.newVisibility != limitedVis)
+                    // see redmine 1333#note-9
                     alert("There are too many items to display the track in " + this.newVisibility + " mode.");
                 var rec = hgTracks.trackDb[this.id];
                 rec.limitedVis = json.trackDb[this.id].limitedVis;
                 updateVisibility(this.id, visibility);
             } else {
                 showWarning("Invalid hgTracks.trackDb received from the server");
             }
         } else {
             hgTracks.trackDb = json.trackDb;
         }
     }
     if(this.loadingId) {
         hideLoadingImage(this.loadingId);
     }
     if(imageV2 && this.id && this.cmd && this.cmd != 'wholeImage' && this.cmd != 'selectWholeGene') {