overleaf/services/web/public/coffee/file-view/FileViewManager.coffee

18 lines
370 B
CoffeeScript
Raw Normal View History

2014-02-12 05:23:40 -05:00
define [
"file-view/FileView"
], (FileView) ->
class FileViewManager
constructor: (@ide) ->
@view = new FileView()
@ide.mainAreaManager.addArea
identifier: "file"
element: @view.$el
$(window).resize () => @view.onResize()
@ide.layoutManager.on "resize", () => @view.onResize()
@view.onResize()
showFile: (file) ->
@view.setModel(file)