Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing multiple refresh bug in filter_box #171

Merged
merged 1 commit into from
Mar 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion panoramix/assets/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"max-depth": [2, 5],
"max-len": [0, 80, 4],
"max-nested-callbacks": [1, 2],
"max-params": [1, 3],
"max-params": [1, 4],
"new-parens": [2],
"newline-after-var": [0],
"no-bitwise": [0],
Expand Down
14 changes: 5 additions & 9 deletions panoramix/assets/visualizations/filter_box.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,17 @@ var d3 = window.d3 || require('d3');
require('./filter_box.css');
require('../javascripts/panoramix-select2.js');


function filterBox(slice) {
var filtersObj = {};
var d3token = d3.select(slice.selector);

var fltChanged = function () {
for (var filter in filtersObj) {
var obj = filtersObj[filter];
var val = obj.val();
var vals = [];
if (val !== '') {
vals = val.split(',');
}
slice.setFilter(filter, vals);
var val = $(this).val();
var vals = [];
if (val !== '') {
vals = val.split(',');
}
slice.setFilter($(this).attr('name'), vals);
};

var refresh = function () {
Expand Down