More sensible argument order on Gestalt.project

This commit is contained in:
Tony Garnock-Jones 2014-05-26 23:22:03 -04:00
parent 03773b6d6d
commit 336b4f36ac
2 changed files with 8 additions and 8 deletions

View File

@ -361,14 +361,14 @@ DemandMatcher.prototype.handleEvent = function (e) {
};
DemandMatcher.prototype.handleGestalt = function (gestalt) {
var newDemandMatcher = gestalt.project(this.metaLevel,
this.demandLevel,
var newDemandMatcher = gestalt.project(this.projectionSpec,
!this.demandSideIsSubscription,
this.projectionSpec);
var newSupplyMatcher = gestalt.project(this.metaLevel,
this.supplyLevel,
this.metaLevel,
this.demandLevel);
var newSupplyMatcher = gestalt.project(this.projectionSpec,
this.demandSideIsSubscription,
this.projectionSpec)
this.metaLevel,
this.supplyLevel);
var newDemand = route.arrayToSet(route.matcherKeys(newDemandMatcher));
var newSupply = route.arrayToSet(route.matcherKeys(newSupplyMatcher));
var demandDelta = route.setSubtract(newDemand, this.currentDemand);

View File

@ -1176,8 +1176,8 @@ function Routing(exports) {
return setToArray(pids);
};
Gestalt.prototype.project = function (metaLevel, level, getAdvertisements, spec) {
var l = this.getLevel(metaLevel, level);
Gestalt.prototype.project = function (spec, getAdvertisements, metaLevel, level) {
var l = this.getLevel(metaLevel | 0, level | 0);
var matcher = (getAdvertisements ? l.advertisements : l.subscriptions);
return project(matcher, spec);
};