diff --git a/build/bundle.js b/build/bundle.js index e25a461f..1f00ec16 100644 --- a/build/bundle.js +++ b/build/bundle.js @@ -6976,6 +6976,7 @@ var Level = Sandbox.extend({ var numCommands = this.gitCommandsIssued.length; var best = this.getNumSolutionCommands(); + Constants.GLOBAL.isAnimating = true; var skipFinishDialog = this.testOption('noFinishDialog'); var finishAnimationChain = this.mainVis.gitVisuals.finishAnimation(); if (!skipFinishDialog) { @@ -7006,6 +7007,7 @@ var Level = Sandbox.extend({ // nothing to do, we will just close }) .done(function() { + Constants.GLOBAL.isAnimating = false; defer.resolve(); }); }, @@ -16886,7 +16888,8 @@ LevelArbiter.prototype.getLevel = function(id) { LevelArbiter.prototype.getNextLevel = function(id) { if (!this.levelMap[id]) { - throw new Error('that level doesnt exist!'); + console.warn('that level doesnt exist!!!'); + return null; } // meh, this method could be better. It's a tradeoff between @@ -21017,7 +21020,8 @@ LevelArbiter.prototype.getLevel = function(id) { LevelArbiter.prototype.getNextLevel = function(id) { if (!this.levelMap[id]) { - throw new Error('that level doesnt exist!'); + console.warn('that level doesnt exist!!!'); + return null; } // meh, this method could be better. It's a tradeoff between @@ -21794,6 +21798,7 @@ var Level = Sandbox.extend({ var numCommands = this.gitCommandsIssued.length; var best = this.getNumSolutionCommands(); + Constants.GLOBAL.isAnimating = true; var skipFinishDialog = this.testOption('noFinishDialog'); var finishAnimationChain = this.mainVis.gitVisuals.finishAnimation(); if (!skipFinishDialog) { @@ -21824,6 +21829,7 @@ var Level = Sandbox.extend({ // nothing to do, we will just close }) .done(function() { + Constants.GLOBAL.isAnimating = false; defer.resolve(); }); }, diff --git a/src/js/level/arbiter.js b/src/js/level/arbiter.js index f5e4f1ca..ed1fce0f 100644 --- a/src/js/level/arbiter.js +++ b/src/js/level/arbiter.js @@ -133,7 +133,8 @@ LevelArbiter.prototype.getLevel = function(id) { LevelArbiter.prototype.getNextLevel = function(id) { if (!this.levelMap[id]) { - throw new Error('that level doesnt exist!'); + console.warn('that level doesnt exist!!!'); + return null; } // meh, this method could be better. It's a tradeoff between diff --git a/src/js/level/index.js b/src/js/level/index.js index 4e440f5a..a4e24473 100644 --- a/src/js/level/index.js +++ b/src/js/level/index.js @@ -332,6 +332,7 @@ var Level = Sandbox.extend({ var numCommands = this.gitCommandsIssued.length; var best = this.getNumSolutionCommands(); + Constants.GLOBAL.isAnimating = true; var skipFinishDialog = this.testOption('noFinishDialog'); var finishAnimationChain = this.mainVis.gitVisuals.finishAnimation(); if (!skipFinishDialog) { @@ -362,6 +363,7 @@ var Level = Sandbox.extend({ // nothing to do, we will just close }) .done(function() { + Constants.GLOBAL.isAnimating = false; defer.resolve(); }); }, diff --git a/todo.txt b/todo.txt index 8ad3c4d6..e8d9a781 100644 --- a/todo.txt +++ b/todo.txt @@ -5,6 +5,8 @@ Big Things Medium things: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ ] fix clickthrough when goal and start are shown +[ ] animating lock refactor -- not just a boolean, but a stack +[ ] fix refreshing during solution animation Cases to handle / things to edit =======================