refactored tab activation

This commit is contained in:
zadam
2020-01-19 21:12:53 +01:00
parent 1098d75ce0
commit 0760dc742b
8 changed files with 79 additions and 44 deletions

View File

@@ -35,6 +35,14 @@ export default class TabCachingWidget extends TabAwareWidget {
return false; // stop propagation to children
}
tabRemovedListener({tabId}) {
const widget = this.widgets[tabId];
if (widget) {
widget.remove();
}
}
toggle(show) {
for (const tabId in this.widgets) {
this.widgets[tabId].toggle(show && this.tabContext && tabId === this.tabContext.tabId);