mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Allow WorkspaceView to be instantiated directly for compatibility
This commit is contained in:
@@ -10,6 +10,7 @@ fs = require 'fs-plus'
|
||||
PaneView = require './pane-view'
|
||||
PaneContainerView = require './pane-container-view'
|
||||
Editor = require './editor'
|
||||
Workspace = require './workspace'
|
||||
|
||||
# Extended: The top-level view for the entire window. An instance of this class is
|
||||
# available via the `atom.workspaceView` global.
|
||||
@@ -66,7 +67,9 @@ class WorkspaceView extends View
|
||||
destroyEmptyPanes: true
|
||||
|
||||
constructor: (@element) ->
|
||||
@element ?= atom.workspace.getView(atom.workspace)
|
||||
super
|
||||
@setModel(atom.workspace) unless @model?
|
||||
@deprecateViewEvents()
|
||||
|
||||
setModel: (@model) ->
|
||||
|
||||
Reference in New Issue
Block a user