removed hideTabRowForOneTab option

This commit is contained in:
zadam
2019-12-23 19:39:48 +01:00
parent bcf163f8a1
commit 6986c201dd
4 changed files with 3 additions and 32 deletions

View File

@@ -40,7 +40,6 @@ class TabRow {
this.eventListeners = {};
this.el = el;
this.hideTabRowForOneTab = false;
this.setupStyleEl();
this.setupEvents();
@@ -62,12 +61,6 @@ class TabRow {
}
}
setHideTabRowForOneTab(hideTabRowForOneTab) {
this.hideTabRowForOneTab = hideTabRowForOneTab;
this.setVisibility();
}
setupStyleEl() {
this.styleEl = document.createElement('style');
this.el.appendChild(this.styleEl);
@@ -92,7 +85,7 @@ class TabRow {
}
setVisibility() {
this.el.style.display = (this.tabEls.length > 1 || !this.hideTabRowForOneTab) ? "block" : "none";
this.el.style.display = "block";
}
get tabEls() {
@@ -429,6 +422,4 @@ class TabRow {
const noteTabRowEl = document.querySelector('.note-tab-row');
const tabRow = new TabRow(noteTabRowEl);
optionsService.addLoadListener(options => tabRow.setHideTabRowForOneTab(options.is('hideTabRowForOneTab')));
export default tabRow;