dc83328fa5ea74ae26e5feb35d1a38e9a8724814 max Wed Nov 6 07:00:00 2024 -0800 another fix for hideOthers, make sure that tracks that are on by default are really hidden, refs #27890 diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index 0b688fe..7c14c0d 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -2158,34 +2158,35 @@ // remove all the lone parent children now from the track image // and also unselect them, if they are children of a composite for (var childName of loneParentChildren) { $(document.getElementById('tr_' + childName)).remove(); var rec = hgTracks.trackDb[childName]; // the following means that all composite children are always unselected, so you cannot get the // current selection easily back, since we always hide them all, instead of just hiding the parent. // The problem is that it's not easy to find out if there is an easier way to hide them, the code // would have to go over all possible parents, not just topParents. Maybe one day. if (tdbIsSubtrack(rec)) { cartVars.push(childName+"_sel"); cartVals.push('0'); } } - // and set the lone parent to hide in the cart and also in the track list below + // and set the lone parent to hide in the cart cartVars.push(loneParent); - cartVals.push('[]'); + cartVals.push('hide'); // need to explicitely set to "hide", not "[]", to hide the default tracks + // update the track list below the image vis.update(loneParent, 'hide'); } // handle all other tracks, they are either not parents or parents with at least one child left var delIds = familyAnalysis.others; for (var i = 0; i