diff --git a/src/commandViews.js b/src/commandViews.js index 25f1a82b..17ebc07a 100644 --- a/src/commandViews.js +++ b/src/commandViews.js @@ -12,6 +12,16 @@ var CommandPromptView = Backbone.View.extend({ $(document).delegate('#commandLineHistory', 'click', _.bind(function() { this.focus(); }, this)); + + + $(document).delegate('#commandTextField', 'blur', _.bind(function() { + this.blur(); + }, this)); + + // hacky timeout focus + setTimeout(_.bind(function() { + this.focus(); + }, this), 100); }, events: { @@ -19,8 +29,15 @@ var CommandPromptView = Backbone.View.extend({ 'keyup #commandTextField': 'onKeyUp' }, + blur: function() { + console.log('got blur'); + $(this.commandCursor).toggleClass('shown', false); + }, + focus: function() { this.$('#commandTextField').focus(); + // we now our cursor is there so... + $(this.commandCursor).toggleClass('shown', true); }, onKey: function(e) { @@ -259,9 +276,6 @@ var CommandLineHistoryView = Backbone.View.extend({ var t = $('#terminal')[0]; if ($(t).hasClass('scrolling')) { - console.log('scrolling'); - console.log(t.scrollHeight); - console.log(t.scrollTop); t.scrollTop = t.scrollHeight; return; } diff --git a/src/constants.js b/src/constants.js index e2c3e76f..e17e1625 100644 --- a/src/constants.js +++ b/src/constants.js @@ -14,7 +14,7 @@ var TIME = { }; var GRAPHICS = { - nodeRadius: 15, + nodeRadius: 17, curveControlPointOffset: 50, defaultEasing: 'easeInOut', defaultAnimationTime: 300, diff --git a/src/style/main.css b/src/style/main.css index 6a0565b6..d142cc40 100644 --- a/src/style/main.css +++ b/src/style/main.css @@ -288,6 +288,10 @@ p.commandLine span.prompt { -webkit-animation-iteration-count: 99999; */ background: #DDD; position: relative; + opacity: 0; +} + +#prompt span.cursor.shown { opacity: 0.7; } diff --git a/src/tree.js b/src/tree.js index 16255cf1..ce082d6c 100644 --- a/src/tree.js +++ b/src/tree.js @@ -526,6 +526,7 @@ var VisNode = Backbone.Model.extend({ var text = paper.text(textPos.x, textPos.y, String(this.get('id'))); text.attr({ 'font-size': 12, + 'font-weight': 'bold', 'font-family': 'Monaco, Courier, font-monospace', opacity: this.getOpacity() });