2e02e6d00e98c4b404bf4f0b4bfb164d9390f1f6 hiram Tue Nov 10 09:14:09 2020 -0800 now passing fontSize to js and sending number of data values for mouseOver mean detection refs #21980 diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index a24a729..4145aaa 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -10744,33 +10744,38 @@ // js code needs to know if a highlightRegion is defined for this db checkAddHighlight(); // call again in case tracksDisplay's call to resolvePosition changed vars char *highlightDef = cartOptionalString(cart, "highlight"); if (highlightDef) jsonObjectAdd(jsonForClient, "highlight", newJsonString(highlightDef)); jsonObjectAdd(jsonForClient, "enableHighlightingDialog", newJsonBoolean(cartUsualBoolean(cart, "enableHighlightingDialog", TRUE))); struct dyString *dy = dyStringNew(1024); jsonDyStringPrint(dy, (struct jsonElement *) jsonForClient, "hgTracks", 0); jsInline(dy->string); dyStringFree(&dy); dy = dyStringNew(1024); if (enableMouseOver) + { + dyStringPrintf(dy, "window.browserTextSize=%s;\n", tl.textSize); dyStringPrintf(dy, "window.mouseOverEnabled=true;\n"); + } else + { dyStringPrintf(dy, "window.mouseOverEnabled=false;\n"); + } jsInline(dy->string); dyStringFree(&dy); if (measureTiming) measureTime("Time at end of doMiddle, next up cart write"); if (cartOptionalString(cart, "udcTimeout")) { warn("The Genome Browser cart currently includes the \"udcTimeout\" string. " "While this is useful for debugging hubs, it may negatively impact " "performance. To clear this variable, click " "here.",cartSessionId(cart)); } }