Skip to content

Commit

Permalink
artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
gordonwoodhull committed Jul 7, 2014
1 parent d387042 commit ae7791a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
13 changes: 10 additions & 3 deletions dc.js
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ dc.baseMixin = function (_chart) {
var filter = filters[i];
if (filter.isFiltered && filter.isFiltered(d)) {
return true;
} else if (filter == d) {
} else if (filter <= d && filter >= d) {
return true;
}
}
Expand Down Expand Up @@ -1007,11 +1007,18 @@ dc.baseMixin = function (_chart) {
**/
_chart.hasFilter = function (filter) {
if (!arguments.length) return _filters.length > 0;
return _filters.indexOf(filter) >= 0;
return _filters.some(function(f) {
return filter <= f && filter >= f;
});
};

function removeFilter(_) {
_filters.splice(_filters.indexOf(_), 1);
for(var i = 0; i < _filters.length; i++) {
if(_filters[i] <= _ && _filters[i] >= _) {
_filters.splice(i, 1);
break;
}
}
applyFilters();
_chart._invokeFilteredListener(_);
}
Expand Down
6 changes: 3 additions & 3 deletions dc.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dc.min.js.map

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions web/js/dc.js
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ dc.baseMixin = function (_chart) {
var filter = filters[i];
if (filter.isFiltered && filter.isFiltered(d)) {
return true;
} else if (filter == d) {
} else if (filter <= d && filter >= d) {
return true;
}
}
Expand Down Expand Up @@ -1007,11 +1007,18 @@ dc.baseMixin = function (_chart) {
**/
_chart.hasFilter = function (filter) {
if (!arguments.length) return _filters.length > 0;
return _filters.indexOf(filter) >= 0;
return _filters.some(function(f) {
return filter <= f && filter >= f;
});
};

function removeFilter(_) {
_filters.splice(_filters.indexOf(_), 1);
for(var i = 0; i < _filters.length; i++) {
if(_filters[i] <= _ && _filters[i] >= _) {
_filters.splice(i, 1);
break;
}
}
applyFilters();
_chart._invokeFilteredListener(_);
}
Expand Down

0 comments on commit ae7791a

Please sign in to comment.