mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 08:28:50 +02:00
boom! wrestled backbone into supporting animations
This commit is contained in:
parent
b7f6bfff5a
commit
dbd7913803
6 changed files with 86 additions and 20 deletions
11
src/git.js
11
src/git.js
|
@ -675,14 +675,23 @@ GitEngine.prototype.deleteBranch = function(name) {
|
|||
this.branches.splice(toDelete, 1);
|
||||
};
|
||||
|
||||
GitEngine.prototype.dispatch = function(command) {
|
||||
GitEngine.prototype.dispatch = function(command, callback) {
|
||||
// current command, options, and args are stored in the gitEngine
|
||||
// for easy reference during processing.
|
||||
this.command = command;
|
||||
this.commandOptions = command.get('supportedMap');
|
||||
this.generalArgs = command.get('generalArgs');
|
||||
|
||||
command.set('status', 'processing');
|
||||
this[command.get('method') + 'Starter']();
|
||||
|
||||
// TODO: move into animation thing
|
||||
var whenDone = _.bind(function() {
|
||||
command.set('status', 'finished');
|
||||
callback();
|
||||
}, this);
|
||||
whenDone();
|
||||
|
||||
};
|
||||
|
||||
GitEngine.prototype.addStarter = function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue