🎨 Refactor initialization of visiblePaneContainers

xref: https://github.com/atom/atom/pull/14640#discussion_r119169281
This commit is contained in:
Jason Rudolph
2017-05-31 10:28:01 -04:00
parent 4c9acf00b3
commit fc007edddd

View File

@@ -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()))