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/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c index 79d91567..5cd90b3 100644 --- src/hg/hgTracks/simpleTracks.c +++ src/hg/hgTracks/simpleTracks.c @@ -10903,37 +10903,30 @@ ct++; return ct; } enum trackVisibility limitVisibility(struct track *tg) /* Return default visibility limited by number of items and * by parent visibility if part of a coposite track. * This also sets tg->height. */ { if (!tg->limitedVisSet) { tg->limitedVisSet = TRUE; // Prevents recursive loop! // optional setting to draw labels onto the feature boxes, not next to them tg->drawLabelInBox = cartOrTdbBoolean(cart, tg->tdb, "labelOnFeature" , FALSE); - if (trackShouldUseAjaxRetrieval(tg)) - { - tg->limitedVis = tg->visibility; - tg->height = REMOTE_TRACK_HEIGHT; - } - else - { enum trackVisibility vis = tg->visibility; int h; int maxHeight = maximumTrackHeight(tg); if (vis == tvHide) { tg->height = 0; tg->limitedVis = tvHide; return tvHide; } if (tg->subtracks != NULL) { struct track *subtrack; int subCnt = subtrackCount(tg->subtracks); maxHeight = maxHeight * max(subCnt,1); @@ -10947,31 +10940,30 @@ } while ((h = tg->totalHeight(tg, vis)) > maxHeight && vis != tvDense) { if (vis == tvFull && tg->canPack) vis = tvPack; else if (vis == tvPack) vis = tvSquish; else vis = tvDense; } tg->height = h; if (tg->limitedVis == tvHide) tg->limitedVis = vis; else tg->limitedVis = tvMin(vis,tg->limitedVis); - } if (tg->syncChildVisToSelf) { struct track *subtrack; for (subtrack = tg->subtracks; subtrack != NULL; subtrack = subtrack->next) { subtrack->visibility = tg->visibility; subtrack->limitedVis = tg->limitedVis; subtrack->limitedVisSet = tg->limitedVisSet; } } else if (tdbIsComposite(tg->tdb)) // If a composite is restricted, { // it's children should be atleast as restricted. struct track *subtrack; for (subtrack = tg->subtracks; subtrack != NULL; subtrack = subtrack->next) @@ -13930,132 +13922,112 @@ } /* else if (sameWord(type, "bedLogR")) { wordCount++; words[1] = "9"; complexBedMethods(track, tdb, FALSE, wordCount, words); //track->bedSize = 10; } */ else if (sameWord(type, "bedTabix")) { knetUdcInstall(); tdb->canPack = TRUE; complexBedMethods(track, tdb, FALSE, wordCount, words); - if (trackShouldUseAjaxRetrieval(tg)) - track->loadItems = dontLoadItems; } else if (sameWord(type, "longTabix")) { char *words[2]; words[0] = type; words[1] = "5"; knetUdcInstall(); complexBedMethods(track, tdb, FALSE, 2, words); longRangeMethods(track, tdb); - if (trackShouldUseAjaxRetrieval(tg)) - track->loadItems = dontLoadItems; } else if (sameWord(type, "mathWig")) { mathWigMethods(track, tdb, wordCount, words); - if (trackShouldUseAjaxRetrieval(track)) - track->loadItems = dontLoadItems; } else if (sameWord(type, "bigBed")) { bigBedMethods(track, tdb, wordCount, words); - if (trackShouldUseAjaxRetrieval(track)) - track->loadItems = dontLoadItems; if (startsWith("gtexEqtlTissue", track->track)) gtexEqtlTissueMethods(track); } else if (sameWord(type, "bigMaf")) { tdb->canPack = TRUE; wordCount++; words[1] = "3"; wigMafMethods(track, tdb, wordCount, words); track->isBigBed = TRUE; - if (trackShouldUseAjaxRetrieval(track)) - track->loadItems = dontLoadItems; } else if (sameWord(type, "bigBarChart")) { tdb->canPack = TRUE; track->isBigBed = TRUE; barChartMethods(track); } else if (sameWord(type, "bigLolly")) { tdb->canPack = TRUE; track->isBigBed = TRUE; track->mapsSelf = TRUE; lollyMethods(track, tdb, wordCount, words); } else if (sameWord(type, "bigInteract")) { track->isBigBed = TRUE; interactMethods(track); } else if (sameWord(type, "bigNarrowPeak")) { tdb->canPack = TRUE; track->isBigBed = TRUE; encodePeakMethods(track); track->loadItems = bigNarrowPeakLoadItems; - if (trackShouldUseAjaxRetrieval(track)) - track->loadItems = dontLoadItems; } else if (sameWord(type, "bigPsl")) { tdb->canPack = TRUE; wordCount++; words[1] = "12"; bigBedMethods(track, tdb, wordCount, words); - if (trackShouldUseAjaxRetrieval(track)) - track->loadItems = dontLoadItems; } else if (sameWord(type, "bigChain")) { tdb->canPack = TRUE; wordCount++; words[1] = "11"; track->isBigBed = TRUE; chainMethods(track, tdb, wordCount, words); - if (trackShouldUseAjaxRetrieval(track)) - track->loadItems = dontLoadItems; } else if (sameWord(type, "bigGenePred")) { tdb->canPack = TRUE; wordCount++; words[1] = "12"; bigBedMethods(track, tdb, wordCount, words); - if (trackShouldUseAjaxRetrieval(track)) - track->loadItems = dontLoadItems; } else if (sameWord(type, "bedGraph")) { bedGraphMethods(track, tdb, wordCount, words); } else if (sameWord(type, "bigWig")) { bigWigMethods(track, tdb, wordCount, words); - if (trackShouldUseAjaxRetrieval(track)) - track->loadItems = dontLoadItems; // TODO: Dummy drawItems as well? } else #endif /* GBROWSE */ if (sameWord(type, "wig")) { wigMethods(track, tdb, wordCount, words); } else if (startsWith("wigMaf", type)) { wigMafMethods(track, tdb, wordCount, words); } #ifndef GBROWSE else if (sameWord(type, "sample")) { sampleMethods(track, tdb, wordCount, words); @@ -14097,62 +14069,52 @@ else if (sameWord(type, "chain")) { chainMethods(track, tdb, wordCount, words); } else if (sameWord(type, "netAlign")) { netMethods(track); } else if (sameWord(type, "maf")) { mafMethods(track); } else if (sameWord(type, "bam")) { bamMethods(track); - if (trackShouldUseAjaxRetrieval(track)) - track->loadItems = dontLoadItems; } else if (sameWord(type, "hic")) { hicMethods(track); } #ifdef USE_HAL else if (sameWord(type, "pslSnake")) { halSnakeMethods(track, tdb, wordCount, words); - if (trackShouldUseAjaxRetrieval(track)) - track->loadItems = dontLoadItems; } else if (sameWord(type, "halSnake")) { halSnakeMethods(track, tdb, wordCount, words); - if (trackShouldUseAjaxRetrieval(track)) - track->loadItems = dontLoadItems; } #endif else if (sameWord(type, "vcfTabix")) { vcfTabixMethods(track); - if (trackShouldUseAjaxRetrieval(track)) - track->loadItems = dontLoadItems; } else if (sameWord(type, "vcf")) { vcfMethods(track); - if (trackShouldUseAjaxRetrieval(track)) - track->loadItems = dontLoadItems; } else if (startsWith(type, "bedDetail")) { bedDetailMethods(track); } else if (sameWord(type, "pgSnp")) { pgSnpCtMethods(track); } #ifndef GBROWSE else if (sameWord(type, "coloredExon")) { coloredExonMethods(track); } else if (sameWord(type, "axt"))