mirror of
https://github.com/atom/atom.git
synced 2026-01-27 15:58:00 -05:00
🎨 Refactor initialization of visiblePaneContainers
xref: https://github.com/atom/atom/pull/14640#discussion_r119169281
This commit is contained in:
@@ -274,11 +274,9 @@ class WorkspaceElement extends HTMLElement {
|
||||
const paneView = pane.getElement()
|
||||
const box = this.boundingBoxForPaneView(paneView)
|
||||
|
||||
const center = atom.workspace.getCenter()
|
||||
const visiblePaneContainers = atom.workspace.getPaneContainers()
|
||||
.filter(container => {
|
||||
const isCenter = container === atom.workspace.getCenter()
|
||||
return isCenter || container.isVisible()
|
||||
})
|
||||
.filter(container => container === center || container.isVisible())
|
||||
|
||||
const visiblePanes = _.flatten(visiblePaneContainers.map(container => container.getPanes()))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user