mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Use atom.workspace.getView to construct WorkspaceViews
It returns the root DOM node of the workspace. Eventually this will be a custom element but for now it’s just a DOM node with a __spacePenView reference on it.
This commit is contained in:
@@ -582,7 +582,7 @@ class Atom extends Model
|
||||
|
||||
startTime = Date.now()
|
||||
@workspace = Workspace.deserialize(@state.workspace) ? new Workspace
|
||||
@workspaceView = new WorkspaceView(@workspace)
|
||||
@workspaceView = @workspace.getView(@workspace).__spacePenView
|
||||
@deserializeTimings.workspace = Date.now() - startTime
|
||||
|
||||
@keymaps.defaultTarget = @workspaceView[0]
|
||||
|
||||
@@ -10,6 +10,7 @@ Editor = require './editor'
|
||||
PaneContainer = require './pane-container'
|
||||
Pane = require './pane'
|
||||
{jQuery} = require './space-pen-extensions'
|
||||
WorkspaceView = null
|
||||
|
||||
# Essential: Represents the state of the user interface for the entire window.
|
||||
# An instance of this class is available via the `atom.workspace` global.
|
||||
@@ -66,6 +67,9 @@ class Workspace extends Model
|
||||
fullScreen: atom.isFullScreen()
|
||||
packagesWithActiveGrammars: @getPackageNamesWithActiveGrammars()
|
||||
|
||||
getViewClass: ->
|
||||
WorkspaceView ?= require './workspace-view'
|
||||
|
||||
getPackageNamesWithActiveGrammars: ->
|
||||
packageNames = []
|
||||
addGrammar = ({includedGrammarScopes, packageName}={}) ->
|
||||
|
||||
Reference in New Issue
Block a user