trying to remove global references on gitEngine

This commit is contained in:
Peter Cottle 2012-11-03 15:00:35 -07:00
parent 343cd37105
commit b914c9887f
2 changed files with 9 additions and 8 deletions

View file

@ -40,9 +40,6 @@ GitEngine.prototype.init = function() {
// commit once to get things going // commit once to get things going
this.commit(); this.commit();
// now we are ready
events.trigger('gitEngineReady', this);
}; };
GitEngine.prototype.exportTree = function() { GitEngine.prototype.exportTree = function() {
@ -139,9 +136,8 @@ GitEngine.prototype.reloadGraphics = function() {
this.gitVisuals.rootCommit = rootCommit; this.gitVisuals.rootCommit = rootCommit;
// this just basically makes the HEAD branch. the head branch really should have been // this just basically makes the HEAD branch. the head branch really should have been
// a member of a collection and not this annoying edge case stuff... // a member of a collection and not this annoying edge case stuff... one day TODO
// TODO -- hackyyy this.gitVisuals.initHeadBranch();
this.gitVisuals.grabHeadBranch();
// when the paper is ready // when the paper is ready
this.gitVisuals.drawTreeFromReload(); this.gitVisuals.drawTreeFromReload();

View file

@ -101,10 +101,15 @@ GitVisuals.prototype.resetAll = function() {
GitVisuals.prototype.assignGitEngine = function(gitEngine) { GitVisuals.prototype.assignGitEngine = function(gitEngine) {
this.gitEngine = gitEngine; this.gitEngine = gitEngine;
this.grabHeadBranch(); this.initHeadBranch();
}; };
GitVisuals.prototype.grabHeadBranch = function() { GitVisuals.prototype.initHeadBranch = function() {
// it's unfortaunte we have to do this, but the head branch
// is an edge case because it's not part of a collection so
// we can't use events to load or unload it. thus we have to call
// this ugly method which will be deleted one day
// seed this with the HEAD pseudo-branch // seed this with the HEAD pseudo-branch
var headBranch = new VisBranch({ var headBranch = new VisBranch({
branch: this.gitEngine.HEAD, branch: this.gitEngine.HEAD,