ソースを参照

Add `activated` signal to notebook panel.

Afshin Darian 8 年 前
コミット
039fbda462
1 ファイル変更7 行追加0 行削除
  1. 7 0
      src/notebook/notebook/panel.ts

+ 7 - 0
src/notebook/notebook/panel.ts

@@ -111,6 +111,11 @@ class NotebookPanel extends Widget {
     });
   }
 
+  /**
+   * A signal emitted when the panel has been activated.
+   */
+  activated: ISignal<NotebookPanel, void>;
+
   /**
    * A signal emitted when the panel context changes.
    */
@@ -236,6 +241,7 @@ class NotebookPanel extends Widget {
    */
   protected onActivateRequest(msg: Message): void {
     this.content.activate();
+    this.activated.emit(void 0);
   }
 
   /**
@@ -397,6 +403,7 @@ class NotebookPanel extends Widget {
 
 
 // Define the signals for the `NotebookPanel` class.
+defineSignal(NotebookPanel.prototype, 'activated');
 defineSignal(NotebookPanel.prototype, 'contextChanged');
 defineSignal(NotebookPanel.prototype, 'kernelChanged');