009aed1c7b80108e75e1922430316e7c1cac39aa max Fri Oct 22 05:59:18 2021 -0700 making hlColor save syncronous, hopefully this will avoid the problem found by QA in note 34 of the ticket, refs #28098 diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index ae3cc70..bf40d31 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -1050,31 +1050,31 @@ if (pos.chrom === hgTracks.chromName && pos.db === currDb && pos.start <= findPos.chromStart && pos.end >= findPos.chromEnd) { return i; } } } return null; }, saveHlColor : function (hlColor) // save the current hlColor to the object and also the cart variable hlColor and return it. // hlColor is a 6-character hex string prefixed by # { dragSelect.hlColor = hlColor; - cart.setVars(["prevHlColor"], [dragSelect.hlColor]); + cart.setVars(["prevHlColor"], [dragSelect.hlColor], null, false); hgTracks.prevHlColor = hlColor; // cart.setVars does not update the hgTracks-variables. The cart-variable system is a problem. return hlColor; }, loadHlColor : function () // load hlColor from prevHlColor in the cart, or use default color, set and return it // color is a 6-char hex string prefixed by # { if (hgTracks.prevHlColor) dragSelect.hlColor = hgTracks.prevHlColor; else dragSelect.hlColor = dragSelect.hlColorDefault; return dragSelect.hlColor; }, @@ -1152,31 +1152,30 @@ if (dragSelect.startTime===null) return; var dragSelectDialog = $("#dragSelectDialog")[0]; if (!dragSelectDialog) { $("body").append("
" + "

" + "

Highlight color: " + - //"" + "  " + "  Reset

" + "" + "Don't show this again and always zoom with shift.
" + "Re-enable via 'View - Configure Browser' (c then f)

"+ "Selected chromosome position: "); dragSelectDialog = $("#dragSelectDialog")[0]; // reset value $('#hlReset').click(function() { var hlDefault = dragSelect.hlColorDefault; $('#hlColorInput').val(hlDefault); $("#hlColorPicker").spectrum("set", hlDefault); dragSelect.saveHlColor(hlDefault); }); // allow to click checkbox by clicking on the label