Skip to content

Commit

Permalink
More fixes for #844
Browse files Browse the repository at this point in the history
  • Loading branch information
adkinsrs committed Aug 1, 2024
1 parent cac3e02 commit 779ee65
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion www/cgi/get_pattern_element_list.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def main():
# Handle unweighted genecarts which are not saved to tabfile.
# NOTE: Does not check db for existence of unweighted genecart
if scope == "unweighted-list":
result.append({"label":"unweighted", "top_up":[], "top_down":[], "binary": True})
result.append({"label":"unweighted", "top_up":"", "top_down":"", "binary": True})
print(json.dumps(result))
return

Expand Down
16 changes: 10 additions & 6 deletions www/js/projection.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,13 +366,17 @@ const selectPatternWeightResult = async (label) => {

// if projection algorithm is "nmf", then hide the top_down genes
const projectionAlgorithm = document.getElementById('algorithm').value;

const topDownGenesElement = document.getElementById('top-down-genes');

// Hide the element initially
topDownGenesElement.classList.add('is-hidden');

if (projectionAlgorithm === 'nmf') {
//document.getElementById('svg-scoring-method').value = 'top_up'; ? Why is this here? Not a valid value
document.getElementById('top-down-genes').classList.add('is-hidden');
} else {
if (obj.top_down) {
document.getElementById('top-down-genes').classList.remove('is-hidden');
}
// No additional action needed as the element is already hidden
} else if (obj.top_down) {
// Show the element if 'top_down' property is true
topDownGenesElement.classList.remove('is-hidden');
}

// if isMulti=false, show top_up and top_down genes
Expand Down

0 comments on commit 779ee65

Please sign in to comment.