diff --git a/src/commandModel.js b/src/commandModel.js index 3a8255fb..fc8f02ee 100644 --- a/src/commandModel.js +++ b/src/commandModel.js @@ -12,7 +12,7 @@ var Command = Backbone.Model.extend({ }, validateAtInit: function() { - if (!this.get('rawStr')) { + if (this.get('rawStr') === null) { throw new Error('Give me a string!'); } if (!this.get('createTime')) { diff --git a/src/commandViews.js b/src/commandViews.js index 97d39f26..d562851d 100644 --- a/src/commandViews.js +++ b/src/commandViews.js @@ -70,10 +70,7 @@ var CommandPromptView = Backbone.View.extend({ _.each(value.split(';'), _.bind(function(command) { command = command.replace(/^(\s+)/, ''); command = command.replace(/(\s+)$/, ''); - console.log('the command is', command); - if (command.length) { - this.addToCollection(command); - } + this.addToCollection(command); }, this)); }, diff --git a/src/git.js b/src/git.js index 02486a75..1dc37702 100644 --- a/src/git.js +++ b/src/git.js @@ -42,7 +42,10 @@ GitEngine.prototype.init = function() { this.commit(); // update tree - events.trigger('treeRefresh'); + // TODO make async, not async + setTimeout(function() { + events.trigger('treeRefresh'); + }, 100); }; GitEngine.prototype.getDetachedHead = function() { diff --git a/src/index.html b/src/index.html index 8b1798c8..87f09e1a 100644 --- a/src/index.html +++ b/src/index.html @@ -37,8 +37,8 @@ Learn Git Branching -
-
+
+
diff --git a/src/style/main.css b/src/style/main.css index bd8fb549..d7701d24 100644 --- a/src/style/main.css +++ b/src/style/main.css @@ -247,5 +247,6 @@ p.commandLine span.prompt { box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.3) inset; border: 1px solid #6287A4; border-radius: 0 0 5px 5px; + -webkit-box-align: start; } diff --git a/src/tree.js b/src/tree.js index dce80e9e..d44b2af4 100644 --- a/src/tree.js +++ b/src/tree.js @@ -129,6 +129,7 @@ var VisEdge = Backbone.Model.extend({ genGraphics: function(paper) { var pathString = this.getBezierCurve(); var path = cutePath(paper, pathString); + path.toBack(); this.set('path', path); },