mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-25 23:48:34 +02:00
makes other vis and refreshes it out
This commit is contained in:
parent
29d401e701
commit
5e151238c9
3 changed files with 81 additions and 18 deletions
|
@ -6739,8 +6739,8 @@ var Visualization = Backbone.View.extend({
|
||||||
treeString: JSON.stringify(options.tree)
|
treeString: JSON.stringify(options.tree)
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
// return the newly created gitEngine
|
// return the newly created visualization which will soon have a git engine
|
||||||
return this.originVis.gitEngine;
|
return this.originVis;
|
||||||
},
|
},
|
||||||
|
|
||||||
setTreeIndex: function(level) {
|
setTreeIndex: function(level) {
|
||||||
|
@ -7066,7 +7066,7 @@ GitEngine.prototype.hasOrigin = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.isOrigin = function() {
|
GitEngine.prototype.isOrigin = function() {
|
||||||
return !!this.localRepro;
|
return !!this.localRepo;
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.exportTree = function() {
|
GitEngine.prototype.exportTree = function() {
|
||||||
|
@ -7191,13 +7191,24 @@ GitEngine.prototype.makeOrigin = function(tree) {
|
||||||
// we grab the gitengine out of that and assign that as our origin repo
|
// we grab the gitengine out of that and assign that as our origin repo
|
||||||
// which connects the two
|
// which connects the two
|
||||||
var masterVis = this.gitVisuals.getVisualization();
|
var masterVis = this.gitVisuals.getVisualization();
|
||||||
var originRepo = masterVis.makeOrigin({
|
var originVis = masterVis.makeOrigin({
|
||||||
localRepo: this,
|
localRepo: this,
|
||||||
tree: this.getDefaultTree()
|
tree: this.getDefaultTree()
|
||||||
});
|
});
|
||||||
|
|
||||||
this.origin = originRepo;
|
// defer the starting of our animation until origin has been created
|
||||||
originRepo.assignLocalRepo(this);
|
this.animationQueue.set('defer', true);
|
||||||
|
originVis.customEvents.on('gitEngineReady', function() {
|
||||||
|
this.origin = originVis.gitEngine;
|
||||||
|
originVis.gitEngine.assignLocalRepo(this);
|
||||||
|
// and then here is the crazy part -- we need the ORIGIN to refresh
|
||||||
|
// itself in a separate animation. @_____@
|
||||||
|
this.origin.externalRefresh();
|
||||||
|
this.animationQueue.start();
|
||||||
|
}, this);
|
||||||
|
|
||||||
|
// add a simple refresh animation
|
||||||
|
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.getOrMakeRecursive = function(tree, createdSoFar, objID) {
|
GitEngine.prototype.getOrMakeRecursive = function(tree, createdSoFar, objID) {
|
||||||
|
@ -8444,6 +8455,16 @@ GitEngine.prototype.filterError = function(err) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// called on a origin repo from a local -- simply refresh immediately with
|
||||||
|
// an animation
|
||||||
|
GitEngine.prototype.externalRefresh = function() {
|
||||||
|
this.animationQueue = new AnimationQueue({
|
||||||
|
callback: function() {}
|
||||||
|
});
|
||||||
|
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
||||||
|
this.animationQueue.start();
|
||||||
|
};
|
||||||
|
|
||||||
GitEngine.prototype.dispatch = function(command, deferred) {
|
GitEngine.prototype.dispatch = function(command, deferred) {
|
||||||
// current command, options, and args are stored in the gitEngine
|
// current command, options, and args are stored in the gitEngine
|
||||||
// for easy reference during processing.
|
// for easy reference during processing.
|
||||||
|
@ -22578,7 +22599,7 @@ GitEngine.prototype.hasOrigin = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.isOrigin = function() {
|
GitEngine.prototype.isOrigin = function() {
|
||||||
return !!this.localRepro;
|
return !!this.localRepo;
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.exportTree = function() {
|
GitEngine.prototype.exportTree = function() {
|
||||||
|
@ -22703,13 +22724,24 @@ GitEngine.prototype.makeOrigin = function(tree) {
|
||||||
// we grab the gitengine out of that and assign that as our origin repo
|
// we grab the gitengine out of that and assign that as our origin repo
|
||||||
// which connects the two
|
// which connects the two
|
||||||
var masterVis = this.gitVisuals.getVisualization();
|
var masterVis = this.gitVisuals.getVisualization();
|
||||||
var originRepo = masterVis.makeOrigin({
|
var originVis = masterVis.makeOrigin({
|
||||||
localRepo: this,
|
localRepo: this,
|
||||||
tree: this.getDefaultTree()
|
tree: this.getDefaultTree()
|
||||||
});
|
});
|
||||||
|
|
||||||
this.origin = originRepo;
|
// defer the starting of our animation until origin has been created
|
||||||
originRepo.assignLocalRepo(this);
|
this.animationQueue.set('defer', true);
|
||||||
|
originVis.customEvents.on('gitEngineReady', function() {
|
||||||
|
this.origin = originVis.gitEngine;
|
||||||
|
originVis.gitEngine.assignLocalRepo(this);
|
||||||
|
// and then here is the crazy part -- we need the ORIGIN to refresh
|
||||||
|
// itself in a separate animation. @_____@
|
||||||
|
this.origin.externalRefresh();
|
||||||
|
this.animationQueue.start();
|
||||||
|
}, this);
|
||||||
|
|
||||||
|
// add a simple refresh animation
|
||||||
|
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.getOrMakeRecursive = function(tree, createdSoFar, objID) {
|
GitEngine.prototype.getOrMakeRecursive = function(tree, createdSoFar, objID) {
|
||||||
|
@ -23956,6 +23988,16 @@ GitEngine.prototype.filterError = function(err) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// called on a origin repo from a local -- simply refresh immediately with
|
||||||
|
// an animation
|
||||||
|
GitEngine.prototype.externalRefresh = function() {
|
||||||
|
this.animationQueue = new AnimationQueue({
|
||||||
|
callback: function() {}
|
||||||
|
});
|
||||||
|
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
||||||
|
this.animationQueue.start();
|
||||||
|
};
|
||||||
|
|
||||||
GitEngine.prototype.dispatch = function(command, deferred) {
|
GitEngine.prototype.dispatch = function(command, deferred) {
|
||||||
// current command, options, and args are stored in the gitEngine
|
// current command, options, and args are stored in the gitEngine
|
||||||
// for easy reference during processing.
|
// for easy reference during processing.
|
||||||
|
@ -33029,8 +33071,8 @@ var Visualization = Backbone.View.extend({
|
||||||
treeString: JSON.stringify(options.tree)
|
treeString: JSON.stringify(options.tree)
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
// return the newly created gitEngine
|
// return the newly created visualization which will soon have a git engine
|
||||||
return this.originVis.gitEngine;
|
return this.originVis;
|
||||||
},
|
},
|
||||||
|
|
||||||
setTreeIndex: function(level) {
|
setTreeIndex: function(level) {
|
||||||
|
|
|
@ -84,7 +84,7 @@ GitEngine.prototype.hasOrigin = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.isOrigin = function() {
|
GitEngine.prototype.isOrigin = function() {
|
||||||
return !!this.localRepro;
|
return !!this.localRepo;
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.exportTree = function() {
|
GitEngine.prototype.exportTree = function() {
|
||||||
|
@ -209,13 +209,24 @@ GitEngine.prototype.makeOrigin = function(tree) {
|
||||||
// we grab the gitengine out of that and assign that as our origin repo
|
// we grab the gitengine out of that and assign that as our origin repo
|
||||||
// which connects the two
|
// which connects the two
|
||||||
var masterVis = this.gitVisuals.getVisualization();
|
var masterVis = this.gitVisuals.getVisualization();
|
||||||
var originRepo = masterVis.makeOrigin({
|
var originVis = masterVis.makeOrigin({
|
||||||
localRepo: this,
|
localRepo: this,
|
||||||
tree: this.getDefaultTree()
|
tree: this.getDefaultTree()
|
||||||
});
|
});
|
||||||
|
|
||||||
this.origin = originRepo;
|
// defer the starting of our animation until origin has been created
|
||||||
originRepo.assignLocalRepo(this);
|
this.animationQueue.set('defer', true);
|
||||||
|
originVis.customEvents.on('gitEngineReady', function() {
|
||||||
|
this.origin = originVis.gitEngine;
|
||||||
|
originVis.gitEngine.assignLocalRepo(this);
|
||||||
|
// and then here is the crazy part -- we need the ORIGIN to refresh
|
||||||
|
// itself in a separate animation. @_____@
|
||||||
|
this.origin.externalRefresh();
|
||||||
|
this.animationQueue.start();
|
||||||
|
}, this);
|
||||||
|
|
||||||
|
// add a simple refresh animation
|
||||||
|
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.getOrMakeRecursive = function(tree, createdSoFar, objID) {
|
GitEngine.prototype.getOrMakeRecursive = function(tree, createdSoFar, objID) {
|
||||||
|
@ -1462,6 +1473,16 @@ GitEngine.prototype.filterError = function(err) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// called on a origin repo from a local -- simply refresh immediately with
|
||||||
|
// an animation
|
||||||
|
GitEngine.prototype.externalRefresh = function() {
|
||||||
|
this.animationQueue = new AnimationQueue({
|
||||||
|
callback: function() {}
|
||||||
|
});
|
||||||
|
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
|
||||||
|
this.animationQueue.start();
|
||||||
|
};
|
||||||
|
|
||||||
GitEngine.prototype.dispatch = function(command, deferred) {
|
GitEngine.prototype.dispatch = function(command, deferred) {
|
||||||
// current command, options, and args are stored in the gitEngine
|
// current command, options, and args are stored in the gitEngine
|
||||||
// for easy reference during processing.
|
// for easy reference during processing.
|
||||||
|
|
|
@ -100,8 +100,8 @@ var Visualization = Backbone.View.extend({
|
||||||
treeString: JSON.stringify(options.tree)
|
treeString: JSON.stringify(options.tree)
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
// return the newly created gitEngine
|
// return the newly created visualization which will soon have a git engine
|
||||||
return this.originVis.gitEngine;
|
return this.originVis;
|
||||||
},
|
},
|
||||||
|
|
||||||
setTreeIndex: function(level) {
|
setTreeIndex: function(level) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue