mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 17:00:04 +02:00
yay ok working
This commit is contained in:
parent
ebdf188c1d
commit
eb33897a22
6 changed files with 166 additions and 17 deletions
|
@ -38,6 +38,8 @@ var Sandbox = Backbone.View.extend({
|
|||
return $('#mainVisSpace')[0];
|
||||
},
|
||||
|
||||
getAnimationTime: function() { return 700 * 1.5; },
|
||||
|
||||
initVisualization: function(options) {
|
||||
this.mainVis = new Visualization({
|
||||
el: options.el || this.getDefaultVisEl()
|
||||
|
@ -64,6 +66,9 @@ var Sandbox = Backbone.View.extend({
|
|||
// we obviously take care of sandbox commands
|
||||
Main.getEventBaton().stealBaton('processSandboxCommand', this.processSandboxCommand, this);
|
||||
|
||||
// a few things to help transition between levels and sandbox
|
||||
Main.getEventBaton().stealBaton('levelExited', this.levelExited, this);
|
||||
|
||||
this.insertGitShim();
|
||||
},
|
||||
|
||||
|
@ -73,6 +78,11 @@ var Sandbox = Backbone.View.extend({
|
|||
Main.getEventBaton().releaseBaton('commandSubmitted', this.commandSubmitted, this);
|
||||
// we obviously take care of sandbox commands
|
||||
Main.getEventBaton().releaseBaton('processSandboxCommand', this.processSandboxCommand, this);
|
||||
console.log('just released two things about to...');
|
||||
console.log(Main.getEventBaton());
|
||||
|
||||
// a few things to help transition between levels and sandbox
|
||||
Main.getEventBaton().releaseBaton('levelExited', this.levelExited, this);
|
||||
|
||||
this.releaseGitShim();
|
||||
},
|
||||
|
@ -118,6 +128,18 @@ var Sandbox = Backbone.View.extend({
|
|||
method.apply(this, [command, deferred]);
|
||||
},
|
||||
|
||||
hide: function() {
|
||||
this.mainVis.hide();
|
||||
},
|
||||
|
||||
levelExited: function() {
|
||||
this.show();
|
||||
},
|
||||
|
||||
show: function() {
|
||||
this.mainVis.show();
|
||||
},
|
||||
|
||||
clear: function(command, deferred) {
|
||||
Main.getEvents().trigger('clearOldCommands');
|
||||
if (command && deferred) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue