From b1e5b321bd2ea762936eea68ff0e7320695e8280 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Mon, 13 Apr 2015 01:34:01 +0200 Subject: client/filter menu: allow click on text --- src/client/view/graph_view.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/client') diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js index 42813cab..88bf9927 100644 --- a/src/client/view/graph_view.js +++ b/src/client/view/graph_view.js @@ -109,14 +109,14 @@ function init_checkboxes(graph, update_view) { //$('.menu__type-filter_item,.menu__type-filter_item input') $('#menu__type-filter') .asEventStream('click') - .doAction(function (e) { + .onValue(function (e) { var inp = $(e.target).find('input')[0]; - inp.checked = !inp.checked; + + if (inp && inp.checked !== undefined) { + inp.checked = !inp.checked; + e.preventDefault(); + } e.stopPropagation(); - e.preventDefault(); - }) - .map(read_checkboxes) - .onValue(function (filter_states) { graph.node__set_filtered_types(filtered_states()); update_view(true); }) -- cgit v1.3.1