mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-26 16:08:34 +02:00
WOW somehow got it to work with events being a module export
This commit is contained in:
parent
6327566a63
commit
7ef0d19e12
7 changed files with 70 additions and 46 deletions
|
@ -1,3 +1,5 @@
|
|||
var Main = require('./main');
|
||||
|
||||
var Collections = require('./collections');
|
||||
var CommitCollection = Collections.CommitCollection;
|
||||
var BranchCollection = Collections.BranchCollection;
|
||||
|
@ -88,7 +90,7 @@ function GitVisuals(options) {
|
|||
this.branchCollection.on('remove', this.removeBranch, this);
|
||||
this.deferred = [];
|
||||
|
||||
events.on('refreshTree', _.bind(
|
||||
Main.getEvents().on('refreshTree', _.bind(
|
||||
this.refreshTree, this
|
||||
));
|
||||
}
|
||||
|
@ -531,7 +533,7 @@ GitVisuals.prototype.calcDepthRecursive = function(commit, depth) {
|
|||
GitVisuals.prototype.canvasResize = function(width, height) {
|
||||
// refresh when we are ready
|
||||
if (GLOBAL.isAnimating) {
|
||||
events.trigger('processCommandFromEvent', 'refresh');
|
||||
Main.getEvents().trigger('processCommandFromEvent', 'refresh');
|
||||
} else {
|
||||
this.refreshTree();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue