|
|
|
@ -2,7 +2,7 @@ import { attachClickEvent } from "../helpers/dom";
@@ -2,7 +2,7 @@ import { attachClickEvent } from "../helpers/dom";
|
|
|
|
|
import { horizontalMenu } from "./horizontalMenu"; |
|
|
|
|
import { TransitionSlider } from "./transition"; |
|
|
|
|
import appNavigationController, { NavigationItem } from "./appNavigationController"; |
|
|
|
|
import SliderSuperTab, { SliderTab } from "./sliderTab"; |
|
|
|
|
import SliderSuperTab, { SliderSuperTabConstructable, SliderTab } from "./sliderTab"; |
|
|
|
|
|
|
|
|
|
const TRANSITION_TIME = 250; |
|
|
|
|
|
|
|
|
@ -105,6 +105,18 @@ export default class SidebarSlider {
@@ -105,6 +105,18 @@ export default class SidebarSlider {
|
|
|
|
|
this.onCloseTab(id, undefined); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public sliceTabsUntilTab(tabConstructor: SliderSuperTabConstructable, preserveTab: SliderSuperTab) { |
|
|
|
|
for(let i = this.historyTabIds.length - 1; i >= 0; --i) { |
|
|
|
|
const tab = this.historyTabIds[i]; |
|
|
|
|
if(tab === preserveTab) continue; |
|
|
|
|
else if(tab instanceof tabConstructor) { |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.removeTabFromHistory(tab); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public onCloseTab(id: number | SliderSuperTab, animate: boolean) { |
|
|
|
|
const tab: SliderTab = id instanceof SliderSuperTab ? id : this.tabs.get(id); |
|
|
|
|
if(tab) { |
|
|
|
|