summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2015-04-13 01:34:01 +0200
committerAlon Levy <alon@pobox.com>2015-04-13 01:34:01 +0200
commitb1e5b321bd2ea762936eea68ff0e7320695e8280 (patch)
tree393f48f4d42b06cc9823bc256f64ae757a0653f8 /src/client
parent4c49c55cc0f6a7f42a7bd0c7c43ab766f52a275a (diff)
client/filter menu: allow click on text
Diffstat (limited to 'src/client')
-rw-r--r--src/client/view/graph_view.js12
1 files changed, 6 insertions, 6 deletions
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);
})