before headless fix, but not animation factory is static class

This commit is contained in:
Peter Cottle 2013-06-05 18:48:59 -10:00
parent a7e515dd8c
commit d0e206bcc4
4 changed files with 56 additions and 49 deletions

View file

@ -5,7 +5,7 @@ var Q = require('q');
var intl = require('../intl');
var AnimationFactoryModule = require('../visuals/animation/animationFactory');
var AnimationFactory = require('../visuals/animation/animationFactory').AnimationFactory;
var AnimationQueue = require('../visuals/animation').AnimationQueue;
var TreeCompare = require('./treeCompare').TreeCompare;
@ -28,8 +28,9 @@ function GitEngine(options) {
this.eventBaton = options.eventBaton;
this.eventBaton.stealBaton('processGitCommand', this.dispatch, this);
// poor man's dependency injection
this.animationFactory = options.animationFactory ||
new AnimationFactoryModule.AnimationFactory();
AnimationFactory;
// global variable to keep track of the options given
// along with the command call.