92ca35b40020f7b62a7dbd42a7bad7257a4c3eb2 angie Mon Jun 1 12:15:43 2026 -0700 Add font size select to recombinant display popup. diff --git src/hg/hgPhyloPlace/phyloPlace.c src/hg/hgPhyloPlace/phyloPlace.c index e1379f5219c..7f5ea3143bb 100644 --- src/hg/hgPhyloPlace/phyloPlace.c +++ src/hg/hgPhyloPlace/phyloPlace.c @@ -2412,52 +2412,57 @@ "</th>"); if (isNotEmpty(recombinants->recombMutations)) { puts("<th>Show mutations" TOOLTIP("Click the button to show a diagram of mutations matching the donor and/or acceptor") "</th>"); } puts("</tr></thead><tbody>"); if (isNotEmpty(recombinants->recombMutations)) { // The user may change this using a checkbox in a dialog; keep a hidden input on the main page to be updated // by the dialog JS when the user clicks on the dialog checkbox, to keep the state in case they close and reopen // the dialog. boolean informativeOnly = cartUsualBoolean(cart, "hgpp_informativeOnly", FALSE); cgiMakeHiddenVarWithIdExtra("hidden_showInformative", "hidden_showInformative", informativeOnly ? "1" : "0", NULL); + // Likewise, the user may change fontSize using a select in the dialog. + int fontSize = cartUsualInt(cart, "hgpp_recombFontSize", 10); + char fontSizeString[64]; + safef(fontSizeString, sizeof fontSizeString, "%d", fontSize); + cgiMakeHiddenVarWithIdExtra("hidden_fontSize", "hidden_fontSize", fontSizeString, NULL); } struct dyString *dyRNodeId = dyStringNew(0); struct dyString *dyJs = dyStringNew(0); int rNum; struct recombinantInfo *ri; for (ri = recombinants, rNum = 0; ri != NULL; ri = ri->next, rNum++) { makeNiceNodeName(dyRNodeId, ri, descendants, sampleIds); printf("<tr><td>%s</td><td>%s</td><td>%s</td>", dyRNodeId->string, ri->recombClade, ri->recombLineage); printf("<td>%d (from %d)</td>", ri->parsimonyImprovement, ri->originalParsimony); printf("<td>%s</td><td>%d</td><td>%s</td><td>%s</td>", ri->donorNodeId, ri->donorNumDesc, ri->donorClade, ri->donorLineage); printf("<td>%s</td><td>%d</td><td>%s</td><td>%s</td>", ri->acceptorNodeId, ri->acceptorNumDesc, ri->acceptorClade, ri->acceptorLineage); printf("<td>(%d, %d)</td><td>(%d, %d)</td>", ri->bp1Min, ri->bp1Max, ri->bp2Min, ri->bp2Max); if (isNotEmpty(ri->recombMutations)) { puts("<td>"); dyStringClear(dyJs); dyStringPrintf(dyJs, "hgPhyloPlace.onClickRecombinant(recombinantData, %d, " - "$('#hidden_showInformative').val() == 1); return 0;", rNum); + "$('#hidden_showInformative').val() == 1, $('#hidden_fontSize').val()); return 0;", rNum); char name[256]; safef(name, sizeof name, "showMutations_%d", rNum); cgiMakeOnClickButton(name, dyJs->string, "Show mutations"); puts("</td>"); } puts("</tr>\n"); } puts("</tbody></table>"); puts("</p>"); } static struct singleNucChange *sncListFromSampleMutsAndImputed(struct slName *sampleMuts, struct baseVal *imputedBases, struct seqWindow *gSeqWin) /* Convert a list of "<ref><pos><alt>" names to struct singleNucChange list.