瀏覽代碼

work in progress

Afshin Darian 8 年之前
父節點
當前提交
a868d847b7
共有 2 個文件被更改,包括 14 次插入13 次删除
  1. 1 1
      package.json
  2. 13 12
      src/application/shell.ts

+ 1 - 1
package.json

@@ -20,7 +20,7 @@
     "@phosphor/properties": "^0.1.0",
     "@phosphor/signaling": "^0.1.1",
     "@phosphor/virtualdom": "^0.1.0",
-    "@phosphor/widgets": "^0.1.4",
+    "@phosphor/widgets": "^0.1.7",
     "ansi_up": "^1.3.0",
     "codemirror": "^5.23",
     "d3-dsv": "^1.0.0",

+ 13 - 12
src/application/shell.ts

@@ -394,19 +394,20 @@ class ApplicationShell extends Widget {
    */
   private _nextTabBar(): TabBar<Widget> {
     let current = this._currentTabBar();
-    if (current) {
-      let bars = toArray(this._dockPanel.tabBars());
-      let len = bars.length;
-      let ci = ArrayExt.firstIndexOf(bars, current);
-      let nextBar: TabBar<Widget> = null;
-      if (ci < (len - 1)) {
-        nextBar = bars[ci + 1];
-      } else if (ci === len - 1) {
-        nextBar = bars[0];
-      }
-      return nextBar;
+    if (!current) {
+      return void 0;
     }
-    return void 0;
+
+    let bars = toArray(this._dockPanel.tabBars());
+    let len = bars.length;
+    let ci = ArrayExt.firstIndexOf(bars, current);
+    let nextBar: TabBar<Widget> = null;
+    if (ci < (len - 1)) {
+      nextBar = bars[ci + 1];
+    } else if (ci === len - 1) {
+      nextBar = bars[0];
+    }
+    return nextBar;
   }