mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 08:28:50 +02:00
Fixes Issue #36
This commit is contained in:
parent
c90444fe1e
commit
9cf91038c1
7 changed files with 48 additions and 18 deletions
|
@ -134,8 +134,6 @@ var Level = Sandbox.extend({
|
|||
el: options.el || this.getDefaultVisEl(),
|
||||
treeString: options.level.startTree
|
||||
});
|
||||
|
||||
this.initGoalVisualization();
|
||||
},
|
||||
|
||||
initGoalVisualization: function() {
|
||||
|
@ -153,6 +151,12 @@ var Level = Sandbox.extend({
|
|||
});
|
||||
},
|
||||
|
||||
onGoalVisualizationClick: function() {
|
||||
// we need to destory this entire view whenever it is hidden so the scroll bar
|
||||
// still works. unfortunately this
|
||||
delete this.goalCanvasHolder;
|
||||
},
|
||||
|
||||
showSolution: function(command, deferred) {
|
||||
var toIssue = this.level.solutionCommand;
|
||||
var issueFunc = function() {
|
||||
|
@ -197,6 +201,9 @@ var Level = Sandbox.extend({
|
|||
},
|
||||
|
||||
showGoal: function(command, defer) {
|
||||
if (!this.goalCanvasHolder || !this.goalCanvasHolder.inDom) {
|
||||
this.initGoalVisualization();
|
||||
}
|
||||
this.goalCanvasHolder.slideIn();
|
||||
|
||||
if (!command || !defer) { return; }
|
||||
|
@ -206,7 +213,7 @@ var Level = Sandbox.extend({
|
|||
},
|
||||
|
||||
hideGoal: function(command, defer) {
|
||||
this.goalCanvasHolder.slideOut();
|
||||
this.goalCanvasHolder.die();
|
||||
if (!command || !defer) { return; }
|
||||
|
||||
setTimeout(function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue