browsers hide themselves

This commit is contained in:
Chris Wanstrath
2011-11-06 23:20:31 -08:00
parent ac9a5efb94
commit 8e56bf8a6e
2 changed files with 6 additions and 1 deletions

View File

@@ -1,9 +1,15 @@
$ = require 'jquery'
Event = require 'event'
module.exports =
class Browser
constructor: (@path) ->
$('.main.pane').append @html().hide()
Event.on "editor:bufferFocus", (e) =>
@hide() if e.details isnt @path
on: ->
html: ->
$ "<iframe src='#{@path}' style='width:100%;height:100%'></iframe>"

View File

@@ -156,7 +156,6 @@ class Editor
@activePath = path
buffer = @buffers[path] or @addBuffer path
$("iframe").hide()
if buffer.constructor is EditSession
$('#ace-editor').show()
@ace.setSession buffer