Clicking on term view toggles playback

openid
Marcin Kulik 13 years ago
parent 755efc09d1
commit f3c80398cb

@ -2,6 +2,9 @@ class AsciiIo.TerminalView extends Backbone.View
tagName: 'pre' tagName: 'pre'
className: 'terminal' className: 'terminal'
events:
'click': 'onClick'
initialize: (options) -> initialize: (options) ->
@cols = options.cols @cols = options.cols
@lines = options.lines @lines = options.lines
@ -22,6 +25,9 @@ class AsciiIo.TerminalView extends Backbone.View
@$el.append "\n" @$el.append "\n"
i++ i++
onClick: ->
@trigger('terminal-click')
clearScreen: -> clearScreen: ->
# this.lineData.length = 0; # this.lineData.length = 0;
# @cursorY = @cursorX = 0 # @cursorY = @cursorX = 0

@ -26,6 +26,7 @@
color: #ccc; color: #ccc;
overflow: auto; overflow: auto;
overflow-x: hidden; overflow-x: hidden;
cursor: pointer;
.line { .line {
font-size: 12px; font-size: 12px;
@ -60,6 +61,7 @@
width: 30px; width: 30px;
height: 100%; height: 100%;
float: left; float: left;
cursor: pointer;
&.paused { &.paused {
background-color: orange; background-color: orange;
@ -71,6 +73,7 @@
width: 60%; width: 60%;
height: 100%; height: 100%;
float: left; float: left;
cursor: pointer;
.gutter { .gutter {
background-color: #333; background-color: #333;

Loading…
Cancel
Save