summaryrefslogtreecommitdiff
path: root/src/client/view/graph_view.js
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2015-02-06 11:50:52 +0200
committerAlon Levy <alon@pobox.com>2015-02-06 11:50:52 +0200
commitb6756b8dd1aad3de178201d98a7980a4479c2b8a (patch)
tree42baf6212633fe1bb0dbc9e3b8a9ed2cfa99c0cd /src/client/view/graph_view.js
parentb1bcd4818c9f90e23879bdb22421b6d351452f64 (diff)
client/graph_view: filter drop down implementation, really ugly. #306
Diffstat (limited to 'src/client/view/graph_view.js')
-rw-r--r--src/client/view/graph_view.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js
index 0b9bf62b..d1e8ba40 100644
--- a/src/client/view/graph_view.js
+++ b/src/client/view/graph_view.js
@@ -121,11 +121,14 @@ function GraphView(spec) {
function redraw__set_on_checkbox_change()
{
var checkboxes = $('.dropdown-item label input').asEventStream('click').onValue(function (_) {
- read_checkboxes();
- console.log(filter_states);
- update_view(true);
- }
- );
+ read_checkboxes();
+ console.log(filter_states);
+ update_view(true);
+ });
+ $('.dropdown-item.dropdown-menu-heading').asEventStream('click').onValue(function (_) {
+ var hidden = $('.dropdown-item.dropdown-item-type[style="display:none"]').length > 0;
+ $('.dropdown-item.dropdown-item-type').attr('style', 'display:' + (hidden ? '' : 'none'));
+ })
}
function node__is_shown(d) {