|
|
@ -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
|
|
|
|