Skip to content

Commit

Permalink
Merge pull request #171 from mistercrunch/fix_filter
Browse files Browse the repository at this point in the history
Fixing multiple refresh bug in filter_box
  • Loading branch information
mistercrunch committed Mar 8, 2016
2 parents 55d4ac4 + 8292714 commit 91833ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
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

0 comments on commit 91833ce

Please sign in to comment.