4bbcb518f7afc645dd1918d25bc8fab113613d15
angie
Mon Aug 18 16:48:16 2025 -0700
Add tgpLorax.html, use printIframe with already-defined settings, add winStart and winEnd to lorax iframe URL.
diff --git src/hg/hgc/loraxClick.c src/hg/hgc/loraxClick.c
index 5e34ae5a196..5017e5bdb9f 100644
--- src/hg/hgc/loraxClick.c
+++ src/hg/hgc/loraxClick.c
@@ -6,43 +6,29 @@
#include "common.h"
#include "cart.h"
#include "cheapcgi.h"
#include "hgc.h"
#include "jsHelper.h"
void doLorax(struct trackDb *tdb, char *item)
/* Display the Lorax multi-tree viewer. */
{
// Open page and get parameters from CGI
cartWebStart(cart, database, "%s: %s", genome, tdb->longLabel);
char *chrom = cartString(cart, "c");
int start = cartInt(cart, "o");
int end = cartInt(cart, "t");
-// Set iframe style and make iframe with src=[lorax docker with chrom, start and end in URL]
-char *iframeHeight = trackDbSetting(tdb, "loraxIframeHeight");
-printf(
-"\n",
- "100%", iframeHeight);
-
-// Get backend URL from trackDb setting, add chrom, start and end params
-char *iframeUrlBase = trackDbSetting(tdb, "loraxIframeUrlBase");
-printf("\n",
- iframeUrlBase, chrom, start, end);
+// Print iframe (using tdb settings iframeUrl and iframeOptions)
+printIframe(tdb, "");
// jsIncludeFile throws an error due to CSP when invoked via pop-up, but is necessary when
// "Enable pop-up when clicking items" is disabled in Genome Browser.
// When invoked via pop-up, hgTracks has already included lorax.js, so the error can be
// ignored because the file has already been loaded.
jsIncludeFile("lorax.js", NULL);
// jsInline still works in pop-up mode even though jsIncludeFile doesn't. (ASH has no idea why.)
-jsInlineF("loraxView('%s', %d, %d);", chrom, start, end);
+jsInlineF("loraxView('%s', %d, %d, %d, %d);", chrom, winStart, winEnd, start, end);
printTrackHtml(tdb);
}