Browse Source

Clean up.

Afshin Darian 8 years ago
parent
commit
374addeaac
1 changed files with 28 additions and 28 deletions
  1. 28 28
      packages/application/src/shell.ts

+ 28 - 28
packages/application/src/shell.ts

@@ -120,13 +120,6 @@ class ApplicationShell extends Widget {
     this._dockPanel.layoutModified.connect(this._save, this);
   }
 
-  /**
-   * A signal emitted when main area's current focus changes.
-   */
-  get currentChanged(): ISignal<this, ApplicationShell.IChangedArgs> {
-    return this._currentChanged;
-  }
-
   /**
    * A signal emitted when main area's active focus changes.
    */
@@ -135,35 +128,24 @@ class ApplicationShell extends Widget {
   }
 
   /**
-   * The current widget in the shell's main area.
+   * The active widget in the shell's main area.
    */
-  get currentWidget(): Widget | null {
-    return this._tracker.currentWidget;
+  get activeWidget(): Widget | null {
+    return this._tracker.activeWidget;
   }
 
   /**
-   * The active widget in the shell's main area.
+   * A signal emitted when main area's current focus changes.
    */
-  get activeWidget(): Widget | null {
-    return this._tracker.activeWidget;
+  get currentChanged(): ISignal<this, ApplicationShell.IChangedArgs> {
+    return this._currentChanged;
   }
 
   /**
-   * True if the given area is empty.
+   * The current widget in the shell's main area.
    */
-  isEmpty(area: ApplicationShell.Area): boolean {
-    switch (area) {
-    case 'left':
-      return this._leftHandler.stackedPanel.widgets.length === 0;
-    case 'main':
-      return this._dockPanel.isEmpty;
-    case 'top':
-      return this._topPanel.widgets.length === 0;
-    case 'right':
-      return this._rightHandler.stackedPanel.widgets.length === 0;
-    default:
-      return true;
-    }
+  get currentWidget(): Widget | null {
+    return this._tracker.currentWidget;
   }
 
   /**
@@ -174,7 +156,7 @@ class ApplicationShell extends Widget {
   }
 
   /**
-   * Activate a widget in it's area.
+   * Activate a widget in its area.
    */
   activateById(id: string): void {
     if (this._leftHandler.has(id)) {
@@ -340,6 +322,24 @@ class ApplicationShell extends Widget {
     each(toArray(this._dockPanel.widgets()), widget => { widget.close(); });
   }
 
+  /**
+   * True if the given area is empty.
+   */
+  isEmpty(area: ApplicationShell.Area): boolean {
+    switch (area) {
+    case 'left':
+      return this._leftHandler.stackedPanel.widgets.length === 0;
+    case 'main':
+      return this._dockPanel.isEmpty;
+    case 'top':
+      return this._topPanel.widgets.length === 0;
+    case 'right':
+      return this._rightHandler.stackedPanel.widgets.length === 0;
+    default:
+      return true;
+    }
+  }
+
   /**
    * Set the layout data store for the application shell.
    */