ea4850e19c7c50def3d53fee49c63d46a8f6a62d
max
  Fri Nov 7 10:30:45 2025 -0800
fix for dataset flipping, refs #36661

diff --git src/cbPyLib/cellbrowser/cbWeb/js/cellBrowser.js src/cbPyLib/cellbrowser/cbWeb/js/cellBrowser.js
index 8c97d6c..ae2c559 100644
--- src/cbPyLib/cellbrowser/cbWeb/js/cellBrowser.js
+++ src/cbPyLib/cellbrowser/cbWeb/js/cellBrowser.js
@@ -3056,30 +3056,32 @@
         /* return the current field that is used for coloring the UMAP */
         // XX Probably should use db.conf.activeColorField here! - a recent addition
         let fieldName = getVar("meta");
         if (fieldName===undefined)
             fieldName = db.getDefaultColorField();
         return fieldName;
     }
 
     function getActiveLabelField() {
         /* return default label field or from URL */
         let fieldName = getVar("label");
         //if (fieldName===undefined)
             //fieldName = renderer.getLabelField();
         if (fieldName===undefined)
             fieldName = db.conf.labelField;
+        if (fieldName===undefined)
+            fieldName = null;
         return fieldName;
     }
     
     function colorByMetaField(fieldName, doneLoad) {
         /* load the meta data for a field, setup the colors, send it all to the renderer and call doneLoad. if doneLoad is undefined, redraw everything  */
 
         function onMetaArrLoaded(metaArr, metaInfo) {
             gLegend = buildLegendForMeta(metaInfo);
             buildLegendBar();
             var renderColors = legendGetColors(gLegend.rows);
             renderer.setColors(renderColors);
             renderer.setColorArr(metaArr);
             buildWatermark(); // if we're in split mode
             metaInfo.arr = metaArr;
             doneLoad();
@@ -3670,30 +3672,33 @@
        chosenSetValue("tpMetaCombo", "tpMetaVal_"+fieldIdx);
    }
 
    function setLabelDropdown(fieldName) {
        /* set the meta 'label by' dropdown to a given value. The value is the meta field name, or its short label, or its index 
           The special value null means "No Label" */
        var fieldIdx = "none";
        if (fieldName!==null)
            fieldIdx  = db.fieldNameToIndex(fieldName);
        chosenSetValue("tpLabelCombo", "tpMetaVal_"+fieldIdx);
    }
 
    function colorByDefaultField(onDone, ignoreUrl) {
        /* get the default color field from the config or the URL and start coloring by it.
         * Call onDone() when done. */
+       let defLabelField = getActiveLabelField();
+       setLabelDropdown(defLabelField);
+
        var colorType = "meta";
        var colorBy = db.getDefaultColorField();
 
        if (ignoreUrl!==true) {
            // allow to override coloring by URL args
            if (getVar("gene")!==undefined) {
                colorType = "gene";
                colorBy = getVar("gene");
                activateTab("gene");
            }
            else if (getVar("meta")!==undefined) {
                colorType = "meta";
                colorBy = getVar("meta");
                activateTab("meta");
            } else if (getVar("locus")!==undefined) {
@@ -3912,31 +3917,31 @@
                     $("#splitJoinDiv").hide();
                }
            }
        }
 
        function guessRadiusAlpha(dotCount) {
            /* return reasonable radius and alpha values for a number of dots */
            if (dotCount<3000)
                return [4, 0.7];
            if (dotCount<6000)
                return [4, 0.6];
            if (dotCount<10000)
                return [3, 0.5];
            if (dotCount<35000)
                return [2, 0.3];
-           if (dotCount<80000)
+           if (dotCount<90000)
                return [1, 0.5];
            // everything else
            return [0, 0.3];
        }
 
        function makeRendConf(dbConf, dotCount) {
            /* return the 'args' object for the renderer, based on dbConf and count of dots */
            var rendConf = {};
 
            var radius = dbConf.radius;
            var alpha = dbConf.alpha;
 
            if (radius===undefined || alpha===undefined) {
                var radiusAlpha = guessRadiusAlpha(dotCount);