Remove Explorer Stub and ViewModel.Explorer (#101)

This commit is contained in:
Steve Faulkner
2020-07-20 12:59:40 -05:00
committed by GitHub
parent 050da28d6e
commit eab6506940
86 changed files with 469 additions and 1079 deletions

View File

@@ -1,6 +1,7 @@
import * as ko from "knockout";
import * as ViewModels from "../../Contracts/ViewModels";
import TabsManagerTemplate from "./TabsManager.html";
import Explorer from "../Explorer";
export class TabsManager {
public openedTabs: ko.ObservableArray<ViewModels.Tab>;
@@ -62,7 +63,7 @@ export class TabsManager {
this.openedTabs([]);
}
public closeTab(tabId: string, explorer: ViewModels.Explorer): void {
public closeTab(tabId: string, explorer: Explorer): void {
const tabIndex: number = this.openedTabs().findIndex((tab: ViewModels.Tab) => tab.tabId === tabId);
if (tabIndex !== -1) {
const tabToActive: ViewModels.Tab = this.openedTabs()[tabIndex + 1] || this.openedTabs()[tabIndex - 1];