57aba7b8fb23d9bdbeceb665a001452e6d7a6b99 jcasper Thu Jan 8 00:37:48 2026 -0800 An attempt at better auto-scaling for Hi-C colors in arc mode, refs #36774 diff --git src/hg/lib/hicUi.c src/hg/lib/hicUi.c index 76f6b4433e0..ffc9744fc09 100644 --- src/hg/lib/hicUi.c +++ src/hg/lib/hicUi.c @@ -6,40 +6,38 @@ #include "cheapcgi.h" #include "cart.h" #include "hui.h" #include "web.h" #include "trackDb.h" #include "hicUi.h" #include "cStraw.h" #include "regexHelper.h" #include "obscure.h" #include "htmshell.h" #include "htmlColor.h" boolean hicUiArcLimitEnabled(struct cart *cart, struct trackDb *tdb) /* Returns true if the checkbox for limiting the number of displayed arcs is checked */ { -//return cartUsualBooleanClosestToHome(cart, tdb, FALSE, HIC_ARC_LIMIT_CHECKBOX, FALSE); return cartOrTdbBoolean(cart, tdb, HIC_ARC_LIMIT_CHECKBOX, FALSE); } int hicUiGetArcLimit(struct cart *cart, struct trackDb *tdb) /* Returns the currently configured limit on the number of arcs drawn in arc mode. * Defaults to 5000. */ { -//int arcLimit = cartUsualIntClosestToHome(cart, tdb, FALSE, HIC_ARC_LIMIT, 5000); int arcLimit = cartOrTdbInt(cart, tdb, HIC_ARC_LIMIT, 5000); return arcLimit; } void hicUiAddArcLimitJS(struct cart *cart, char *track) /* Write out a bit of javascript to associate checking/unchecking the arc count * limit checkbox with deactivating/activating (respectively) the text * input. */ { struct dyString *new = dyStringNew(0); dyStringPrintf(new, "$('input[name=\"%s.%s\"]')[0].onclick = function() {", track, HIC_ARC_LIMIT_CHECKBOX); dyStringPrintf(new, "if (this.checked) {$('input[name=\"%s.%s\"]')[0].disabled = false; $('span#hicArcLimitText').css('color', '');}", track, HIC_ARC_LIMIT); dyStringPrintf(new, "else {$('input[name=\"%s.%s\"]')[0].disabled = true; $('span#hicArcLimitText').css('color', 'gray');} };\n", track, HIC_ARC_LIMIT); dyStringPrintf(new, "if (!$('input[name=\"%s.%s\"]')[0].checked) {$('input[name=\"%s.%s\"]')[0].disabled = true; $('span#hicArcLimitText').css('color', 'gray');}\n", track, HIC_ARC_LIMIT_CHECKBOX, track, HIC_ARC_LIMIT);