Skip to content

Commit

Permalink
#1144 fix previous commit code that didn't work, changing from workbo…
Browse files Browse the repository at this point in the history
…ok.expression -> grnState.workbook.expression
  • Loading branch information
ntran18 committed Nov 27, 2024
1 parent c8c22bb commit 05cd4bb
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions web-client/public/js/update-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,15 @@ const toggleLayout = (on, off) => {
}
};

const hasExpressionData = (sheets) => {
for (var property in sheets) {
if (property.match(ENDS_IN_EXPRESSION_REGEXP)) {
return true;
}
}
return false;
};

const updatetoForceGraph = () => {};

const updatetoGridLayout = () => {};
Expand Down Expand Up @@ -552,7 +561,8 @@ const updateModeViews = () =>{
};

const checkWorkbookModeSettings = () => {
const hasExpression = hasExpressionData(workbook.expression);
const hasExpression = hasExpressionData(grnState.workbook.expression);

if (grnState.mode === NETWORK_PPI_MODE || !hasExpression) {
grnState.nodeColoring.nodeColoringEnabled = false;
grnState.nodeColoring.showMenu = true;
Expand Down Expand Up @@ -599,15 +609,6 @@ const shortenExpressionSheetName = (name) => {
(name.slice(0, MAX_NUM_CHARACTERS_DROPDOWN) + "...") : name;
};

const hasExpressionData = (sheets) => {
for (var property in sheets) {
if (property.match(ENDS_IN_EXPRESSION_REGEXP)) {
return true;
}
}
return false;
};

const updateSpeciesMenu = () => {
$(SPECIES_DISPLAY).val(grnState.genePageData.species);
$(SPECIES_BUTTON_CRESS + " span").removeClass("glyphicon-ok");
Expand Down

0 comments on commit 05cd4bb

Please sign in to comment.