Skip to content

Commit c8c22bb

Browse files
committed
#1144 Adding code to set node-coloring enable only when having expression spreadsheet
1 parent 0acca88 commit c8c22bb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

web-client/public/js/update-app.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -552,14 +552,15 @@ const updateModeViews = () =>{
552552
};
553553

554554
const checkWorkbookModeSettings = () => {
555-
if (grnState.mode === NETWORK_PPI_MODE) {
555+
const hasExpression = hasExpressionData(workbook.expression);
556+
if (grnState.mode === NETWORK_PPI_MODE || !hasExpression) {
556557
grnState.nodeColoring.nodeColoringEnabled = false;
557558
grnState.nodeColoring.showMenu = true;
558559
grnState.colorOptimal = false;
559560
showNodeColoringMenus();
560561
hideEdgeWeightOptions();
561562
updateModeViews();
562-
} else if (grnState.mode === NETWORK_GRN_MODE) {
563+
} else if (grnState.mode === NETWORK_GRN_MODE && hasExpression) {
563564
grnState.nodeColoring.nodeColoringEnabled = true;
564565
grnState.nodeColoring.showMenu = true;
565566
grnState.colorOptimal = true;

0 commit comments

Comments
 (0)