mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-25 23:48:34 +02:00
Resolves #477 -- scope binding issue with refresh
This commit is contained in:
parent
9a60b082f3
commit
23397adec2
1 changed files with 4 additions and 3 deletions
|
@ -48,7 +48,9 @@ function GitVisuals(options) {
|
||||||
this.flipFraction = 0.65;
|
this.flipFraction = 0.65;
|
||||||
|
|
||||||
var Main = require('../app');
|
var Main = require('../app');
|
||||||
Main.getEvents().on('refreshTree', this.refreshTree, this);
|
var that = this;
|
||||||
|
this._onRefreshTree = function() { that.refreshTree(); };
|
||||||
|
Main.getEvents().on('refreshTree', this._onRefreshTree, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
GitVisuals.prototype.defer = function(action) {
|
GitVisuals.prototype.defer = function(action) {
|
||||||
|
@ -100,7 +102,7 @@ GitVisuals.prototype.tearDown = function() {
|
||||||
// these over time. However we aren't calling tearDown in
|
// these over time. However we aren't calling tearDown in
|
||||||
// some places... but this is an improvement
|
// some places... but this is an improvement
|
||||||
var Main = require('../app');
|
var Main = require('../app');
|
||||||
Main.getEvents().removeListener('refreshTree', this.refreshTree);
|
Main.getEvents().removeListener('refreshTree', this._onRefreshTree);
|
||||||
};
|
};
|
||||||
|
|
||||||
GitVisuals.prototype.assignGitEngine = function(gitEngine) {
|
GitVisuals.prototype.assignGitEngine = function(gitEngine) {
|
||||||
|
@ -949,4 +951,3 @@ function blendHueStrings(hueStrings) {
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.GitVisuals = GitVisuals;
|
exports.GitVisuals = GitVisuals;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue