dd675e620b195081c73d06b62f633c70eef7cf31 hiram Thu Oct 29 13:56:28 2020 -0700 mouseOver now enabled via hg.conf variable refs #21980 diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index 3ba8a16..749b967 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -10620,31 +10620,34 @@ } jsIncludeFile("autocomplete.js", NULL); jsIncludeFile("es5-shim.4.0.3.min.js", NULL); jsIncludeFile("es5-sham.4.0.3.min.js", NULL); jsIncludeFile("lodash.3.10.0.compat.min.js", NULL); jsIncludeFile("autocompleteCat.js", NULL); jsIncludeFile("hgTracks.js", NULL); jsIncludeFile("spectrum.min.js", NULL); #ifdef LOWELAB jsIncludeFile("lowetooltip.js", NULL); #endif///def LOWELAB webIncludeResourceFile("spectrum.min.css"); webIncludeResourceFile("jquery-ui.css"); -// webIncludeResourceFile("mouseOver.css"); + char *mouseOverEnabled = cfgOption("mouseOverEnabled"); + if (sameWordOk(mouseOverEnabled, "on")) + webIncludeResourceFile("mouseOver.css"); + if (!searching) // NOT doing search { webIncludeResourceFile("jquery.contextmenu.css"); jsIncludeFile("jquery.contextmenu.js", NULL); webIncludeResourceFile("ui.dropdownchecklist.css"); jsIncludeFile("ui.dropdownchecklist.js", NULL); jsIncludeFile("ddcl.js", NULL); } hPrintf("
\n"); hPrintf("\n"); cartFlushHubWarnings(); } @@ -10732,30 +10735,41 @@ jsonObjectAdd(jsonForClient, "measureTiming", newJsonBoolean(measureTiming)); // 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); +char *mouseOverEnabled = cfgOption("mouseOverEnabled"); +if (sameWordOk(mouseOverEnabled, "on")) + { + 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)); } } void labelTrackAsFilteredNumber(struct track *tg, unsigned numOut) /* add text to track long label to indicate filter is active */ {