mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-26 16:08:34 +02:00
Issue #181 cleanup and better command handling
This commit is contained in:
parent
507291a0c4
commit
2402a7a469
2 changed files with 3 additions and 2 deletions
|
@ -154,7 +154,9 @@ var Level = Sandbox.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
startOffCommand: function() {
|
startOffCommand: function() {
|
||||||
if (!this.testOption('noStartCommand')) {
|
console.log(this.options);
|
||||||
|
var method = this.options.command.get('method');
|
||||||
|
if (!this.testOption('noStartCommand') && method !== 'importLevelNow') {
|
||||||
Main.getEventBaton().trigger(
|
Main.getEventBaton().trigger(
|
||||||
'commandSubmitted',
|
'commandSubmitted',
|
||||||
'hint; delay 2000; show goal'
|
'hint; delay 2000; show goal'
|
||||||
|
|
|
@ -284,7 +284,6 @@ var Sandbox = Backbone.View.extend({
|
||||||
var Level = require('../level').Level;
|
var Level = require('../level').Level;
|
||||||
try {
|
try {
|
||||||
var levelJSON = JSON.parse(unescape(string));
|
var levelJSON = JSON.parse(unescape(string));
|
||||||
console.log(levelJSON);
|
|
||||||
var whenLevelOpen = Q.defer();
|
var whenLevelOpen = Q.defer();
|
||||||
this.currentLevel = new Level({
|
this.currentLevel = new Level({
|
||||||
level: levelJSON,
|
level: levelJSON,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue