Skip to content

Commit

Permalink
#1144 Adding code to set node-coloring enable only when having expres…
Browse files Browse the repository at this point in the history
…sion spreadsheet
  • Loading branch information
ntran18 committed Nov 20, 2024
1 parent 0acca88 commit c8c22bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web-client/public/js/update-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -552,14 +552,15 @@ const updateModeViews = () =>{
};

const checkWorkbookModeSettings = () => {
if (grnState.mode === NETWORK_PPI_MODE) {
const hasExpression = hasExpressionData(workbook.expression);
if (grnState.mode === NETWORK_PPI_MODE || !hasExpression) {
grnState.nodeColoring.nodeColoringEnabled = false;
grnState.nodeColoring.showMenu = true;
grnState.colorOptimal = false;
showNodeColoringMenus();
hideEdgeWeightOptions();
updateModeViews();
} else if (grnState.mode === NETWORK_GRN_MODE) {
} else if (grnState.mode === NETWORK_GRN_MODE && hasExpression) {
grnState.nodeColoring.nodeColoringEnabled = true;
grnState.nodeColoring.showMenu = true;
grnState.colorOptimal = true;
Expand Down

0 comments on commit c8c22bb

Please sign in to comment.