ソースを参照

CLN: remove unused code and debug print

danielballan 8 年 前
コミット
462821e710
2 ファイル変更2 行追加12 行削除
  1. 0 1
      src/notebook/output-area/model.ts
  2. 2 11
      src/notebook/output-area/widget.ts

+ 0 - 1
src/notebook/output-area/model.ts

@@ -46,7 +46,6 @@ class OutputAreaModel implements IDisposable {
    * A signal emitted when the model is disposed.
    */
   get disposed(): ISignal<OutputAreaModel, void> {
-    console.log('get model disposed signal')
     return Private.disposedSignal.bind(this);
   }
 

+ 2 - 11
src/notebook/output-area/widget.ts

@@ -490,7 +490,7 @@ namespace OutputAreaWidget {
 export
 class OutputGutter extends Widget {
   /**
-   * Handle the DOM events for the output area widget.
+   * Handle the DOM events for the output gutter widget.
    *
    * @param event - The DOM event sent to the widget.
    *
@@ -518,8 +518,7 @@ class OutputGutter extends Widget {
    */
   protected onAfterAttach(msg: Message): void {
     super.onAfterAttach(msg);
-    let node = this.node;
-    node.addEventListener('mousedown', this);
+    this.node.addEventListener('mousedown', this);
   }
 
   /**
@@ -535,17 +534,12 @@ class OutputGutter extends Widget {
    * Handle the `'mousedown'` event for the widget.
    */
   private _evtMousedown(event: MouseEvent): void {
-
     // Left mouse press for drag start.
     if (event.button === 0) {
       this._dragData = { pressX: event.clientX, pressY: event.clientY };
       document.addEventListener('mouseup', this, true);
       document.addEventListener('mousemove', this, true);
     }
-
-    if (event.button !== 0) {
-      clearTimeout(this._selectTimer);
-    }
   }
 
   /**
@@ -603,7 +597,6 @@ class OutputGutter extends Widget {
     // Start the drag and remove the mousemove listener.
     this._drag.start(clientX, clientY).then(action => {
       this._drag = null;
-      clearTimeout(this._selectTimer);
     });
     document.removeEventListener('mousemove', this, true);
   }
@@ -618,13 +611,11 @@ class OutputGutter extends Widget {
     }
     this._dragData = null;
     this._drag = null;
-    this._selectTimer = null;
     super.dispose();
   }
 
   private _drag: Drag = null;
   private _dragData: { pressX: number, pressY: number } = null;
-  private _selectTimer = -1;
 }