comeon keep going

This commit is contained in:
Peter Cottle 2013-01-04 15:24:11 -08:00
parent 0358291e6f
commit 9bb6b5c2d9
6 changed files with 108 additions and 91 deletions

View file

@ -77,6 +77,14 @@ var Level = Sandbox.extend({
}, this));
},
showGoal: function() {
this.goalCanvasHolder.slideIn();
},
hideGoal: function() {
this.goalCanvasHolder.slideOut();
},
initParseWaterfall: function(options) {
this.parseWaterfall = new ParseWaterfall();
@ -90,7 +98,6 @@ var Level = Sandbox.extend({
}).getInstantCommands()
);
}
},
initGitShim: function(options) {
@ -157,6 +164,7 @@ var Level = Sandbox.extend({
levelSolved: function(defer) {
this.solved = true;
this.hideGoal();
this.mainVis.gitVisuals.finishAnimation()
.then(function() {
defer.resolve();

View file

@ -323,6 +323,18 @@ var CanvasTerminalHolder = BaseView.extend({
this.render();
},
slideOut: function() {
this.slideToggle(true);
},
slideIn: function() {
this.slideToggle(false);
},
slideToggle: function(value) {
this.$('div.terminal-window-holder').toggleClass('slideOut', value);
},
getCanvasLocation: function() {
return this.$('div.inside')[0];
}

View file

@ -87,27 +87,6 @@ var Visualization = Backbone.View.extend({
$(this.paper.canvas).css('opacity', 0);
},
harshSlideChange: function(value) {
},
slideOut: function() {
this.toggleSlide(true);
},
slideIn: function() {
this.toggleSlide(false);
},
toggleSlide: function(value) {
if (!this.containerElement) {
console.warn('cant slide with absolute positioning');
return;
}
// no classes on svg :-/
$(this.containerElement).toggleClass('slideOut', value);
},
getAnimationTime: function() { return 300; },
fadeTreeIn: function() {