Skip to content

Commit

Permalink
Merge pull request #3 from suitupalex/master
Browse files Browse the repository at this point in the history
Added ability to pass options when applying filters.
  • Loading branch information
umamialex committed Feb 20, 2015
2 parents 9fef172 + e06876d commit 18dbb30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ampersand-filter-tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
}.bind(this));
}, this);
},
applyFilters: function() {
applyFilters: function(options) {
var props = {};
_.each(this.handles, function(handle) {
_.each(handle.props, function(prop) {
props[prop] = handle.model[prop];
});
});
this.onApply(props);
this.onApply(props, options);
},
cancelFilter: function(event) {
d3.select(event.target.parentNode).each(function(d) {
Expand Down Expand Up @@ -157,7 +157,7 @@
.style('display', _.any(handles, 'active') ? undefined : 'none');
},
applyFilters: function() {
this.model.applyFilters();
this.model.applyFilters({});
},
cancelFilter: function(event) {
this.model.cancelFilter(event);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ampersand-filter-tracker",
"version": "0.1.1",
"version": "0.1.2",
"description": "Creates both a GUI and a filter from multiple models.",
"main": "ampersand-filter-tracker.js",
"scripts": {
Expand Down

0 comments on commit 18dbb30

Please sign in to comment.