dondi / GRNsight

Web app and service for modeling and visualizing gene regulatory networks.
http://dondi.github.io/GRNsight
BSD 3-Clause "New" or "Revised" License
17 stars 8 forks source link

Node colouring dropdown not properly checking/unchecking #906

Closed igreen1 closed 3 years ago

igreen1 commented 3 years ago

From the Node dropdown menu, when 'Enable Node Coloring' is selected, the selection will remain checked, despite Node Coloring turning off. The sidebar 'Enable Node Coloring' will also remain checked. However, selecting the 'Enable Node Color' on the sidebar will properly update the checked state.

It appears then, that the 'checked' property is not properly updated when using Dropdown menu: Node -> Enable Node Coloring.

The dropdown looks like this regardless of state/input/graph: image

mihirsamdarshi commented 3 years ago

This issue has to do with Lines 655 - 776 in update-app.js

https://github.com/dondi/GRNsight/blob/c7ef42057498fdf8af71ab487dbaff855bfb9b26/web-client/public/js/update-app.js#L659-L776

Unfortunately, it seems that that chunk of code isn't really following the MVC architecture that was setup, as the state of the checkboxes are being read inside update-app, instead of setup-handlers. An example can be seen here:

https://github.com/dondi/GRNsight/blob/c7ef42057498fdf8af71ab487dbaff855bfb9b26/web-client/public/js/update-app.js#L670

I also have a couple questions about the variable expressionDBdesired? it kind of just exists, and I was wondering if it served any purpose? https://github.com/dondi/GRNsight/blob/c7ef42057498fdf8af71ab487dbaff855bfb9b26/web-client/public/js/update-app.js#L96 https://github.com/dondi/GRNsight/blob/c7ef42057498fdf8af71ab487dbaff855bfb9b26/web-client/public/js/update-app.js#L655 https://github.com/dondi/GRNsight/blob/c7ef42057498fdf8af71ab487dbaff855bfb9b26/web-client/public/js/update-app.js#L657

dondi commented 3 years ago

Merged and now on beta; @ahmad00m can verify.

ahmad00m commented 3 years ago

@ahmad00m tested the updated version and it worked perfectly fine. The 'checked' property is updated every time it is checked/unchecked .