Skip to content

Commit

Permalink
Remove unused features and add more to constructor init
Browse files Browse the repository at this point in the history
  • Loading branch information
machty committed Feb 22, 2015
1 parent 9489891 commit 75ec7fa
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions lib/router/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ function Router(_options) {
this.didTransition = options.didTransition || this.didTransition;
this.willTransition = options.willTransition || this.willTransition;
this.delegate = options.delegate || this.delegate;
this.triggerEvent = options.triggerEvent || this.triggerEvent;
this.log = options.log || this.log;

this.recognizer = new RouteRecognizer();
this.reset();
Expand Down Expand Up @@ -364,16 +366,7 @@ Router.prototype = {
@param {String} message The message to log.
*/
log: null,

_willChangeContextEvent: 'willChangeContext',
_triggerWillChangeContext: function(handlerInfos, newTransition) {
trigger(this, handlerInfos, true, [this._willChangeContextEvent, newTransition]);
},

_triggerWillLeave: function(handlerInfos, newTransition, leavingChecker) {
trigger(this, handlerInfos, true, ['willLeave', newTransition, leavingChecker]);
}
log: null
};

/**
Expand Down Expand Up @@ -803,12 +796,6 @@ function notifyExistingHandlers(router, newState, newTransition) {
}
return false;
};

router._triggerWillLeave(leaving, newTransition, leavingChecker);
}

if (changing.length > 0) {
router._triggerWillChangeContext(changing, newTransition);
}

trigger(router, oldHandlers, true, ['willTransition', newTransition]);
Expand Down

0 comments on commit 75ec7fa

Please sign in to comment.