Keep matrixService stateless and make matrixFilter use modelService.

This commit is contained in:
Kegan Dougal 2014-11-03 10:23:14 +00:00
parent 5ab9929cbb
commit 395bb64b26
5 changed files with 54 additions and 54 deletions

View file

@ -89,8 +89,11 @@ angular.module('modelService', [])
// provided which can just be given the type and it will return the
// 0-len event by default.
state: function state(type, state_key) {
if (!type) {
return undefined; // event type MUST be specified
}
if (!state_key) {
return this.state_events[type];
return this.state_events[type]; // treat as 0-len state key
}
return this.state_events[type + state_key];
},