fix listen handler

pull/1/head
yann300 6 years ago
parent 7ceaab3b5b
commit 5fddaf3a70
  1. 12
      src/app/panels/tab-proxy.js

@ -27,6 +27,10 @@ export class TabProxy {
})
fileManager.event.register('currentFileChanged', (file) => {
if (this._handlers[file]) {
this._view.filetabs.activateTab(file)
return
}
this.addTab(file, () => {
this.fileManager.switchFile(file)
this.event.emit('switchFile', file)
@ -89,11 +93,11 @@ export class TabProxy {
renderTabsbar () {
this._view.filetabs = yo`<remix-tabs></remix-tabs>`
this._view.filetabs.addEventListener('tabClosed', (id) => {
if (this._handlers[id]) this._handlers[id].close()
this._view.filetabs.addEventListener('tabClosed', (event) => {
if (this._handlers[event.detail]) this._handlers[event.detail].close()
})
this._view.filetabs.addEventListener('tabActivated', (id) => {
if (this._handlers[id]) this._handlers[id].switchTo()
this._view.filetabs.addEventListener('tabActivated', (event) => {
if (this._handlers[event.detail]) this._handlers[event.detail].switchTo()
})
this._view.filetabs.canAdd = false

Loading…
Cancel
Save