mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Fix usages of Workspace.paneContainer
This commit is contained in:
@@ -537,8 +537,8 @@ describe('Workspace', () => {
|
||||
pane4 = workspace.getPanes().filter(p => p !== pane1)[0]
|
||||
expect(workspace.getActivePane()).toBe(pane4)
|
||||
expect(pane4.items).toEqual([editor])
|
||||
expect(workspace.paneContainer.root.children[0]).toBe(pane1)
|
||||
expect(workspace.paneContainer.root.children[1]).toBe(pane4)
|
||||
expect(workspace.getCenter().paneContainer.root.children[0]).toBe(pane1)
|
||||
expect(workspace.getCenter().paneContainer.root.children[1]).toBe(pane4)
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -633,8 +633,8 @@ describe('Workspace', () => {
|
||||
pane4 = workspace.getPanes().filter(p => p !== pane1)[0]
|
||||
expect(workspace.getActivePane()).toBe(pane4)
|
||||
expect(pane4.items).toEqual([editor])
|
||||
expect(workspace.paneContainer.root.children[0]).toBe(pane1)
|
||||
expect(workspace.paneContainer.root.children[1]).toBe(pane2)
|
||||
expect(workspace.getCenter().paneContainer.root.children[0]).toBe(pane1)
|
||||
expect(workspace.getCenter().paneContainer.root.children[1]).toBe(pane2)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -98,7 +98,7 @@ class WorkspaceElement extends HTMLElement {
|
||||
this.observeScrollbarStyle()
|
||||
this.observeTextEditorFontConfig()
|
||||
|
||||
this.paneContainer = this.viewRegistry.getView(this.model.paneContainer)
|
||||
this.paneContainer = this.model.getCenter().paneContainer.getElement()
|
||||
this.verticalAxis.appendChild(this.paneContainer)
|
||||
this.addEventListener('focus', this.handleFocus.bind(this))
|
||||
|
||||
@@ -106,13 +106,13 @@ class WorkspaceElement extends HTMLElement {
|
||||
window.addEventListener('dragstart', this.handleDragStart)
|
||||
|
||||
this.panelContainers = {
|
||||
top: this.viewRegistry.getView(this.model.panelContainers.top),
|
||||
left: this.viewRegistry.getView(this.model.panelContainers.left),
|
||||
right: this.viewRegistry.getView(this.model.panelContainers.right),
|
||||
bottom: this.viewRegistry.getView(this.model.panelContainers.bottom),
|
||||
header: this.viewRegistry.getView(this.model.panelContainers.header),
|
||||
footer: this.viewRegistry.getView(this.model.panelContainers.footer),
|
||||
modal: this.viewRegistry.getView(this.model.panelContainers.modal)
|
||||
top: this.model.panelContainers.top.getElement(),
|
||||
left: this.model.panelContainers.left.getElement(),
|
||||
right: this.model.panelContainers.right.getElement(),
|
||||
bottom: this.model.panelContainers.bottom.getElement(),
|
||||
header: this.model.panelContainers.header.getElement(),
|
||||
footer: this.model.panelContainers.footer.getElement(),
|
||||
modal: this.model.panelContainers.modal.getElement()
|
||||
}
|
||||
|
||||
this.horizontalAxis.insertBefore(this.panelContainers.left, this.verticalAxis)
|
||||
|
||||
Reference in New Issue
Block a user