Fix extra child node removal in PanelContainerElement

This commit is contained in:
Max Brunsfeld
2015-10-16 16:18:40 -07:00
parent 52d0556c6e
commit 7d74382782
2 changed files with 1 additions and 5 deletions

View File

@@ -8,7 +8,6 @@ class PanelContainerElement extends HTMLElement
throw new Error("Must pass a views parameter when initializing PanelContainerElements") unless @views?
@subscriptions.add @model.onDidAddPanel(@panelAdded.bind(this))
@subscriptions.add @model.onDidRemovePanel(@panelRemoved.bind(this))
@subscriptions.add @model.onDidDestroy(@destroyed.bind(this))
@classList.add(@model.getLocation())
this
@@ -34,9 +33,6 @@ class PanelContainerElement extends HTMLElement
@subscriptions.add panel.onDidChangeVisible (visible) =>
@hideAllPanelsExcept(panel) if visible
panelRemoved: ({panel, index}) ->
@removeChild(@views.getView(panel))
destroyed: ->
@subscriptions.dispose()
@parentNode?.removeChild(this)

View File

@@ -32,6 +32,6 @@ class PanelElement extends HTMLElement
destroyed: ->
@subscriptions.dispose()
@parentNode?.removeChild(this)
@remove()
module.exports = PanelElement = document.registerElement 'atom-panel', prototype: PanelElement.prototype