فهرست منبع

Merge pull request #13 from blink1073/test-fixes

Test fixes
Afshin Darian 8 سال پیش
والد
کامیت
4636269fee
3فایلهای تغییر یافته به همراه11 افزوده شده و 4 حذف شده
  1. 1 1
      src/filebrowser/listing.ts
  2. 8 3
      src/notebook/output-area/widget.ts
  3. 2 0
      test/src/index.ts

+ 1 - 1
src/filebrowser/listing.ts

@@ -175,7 +175,7 @@ const IS_MAC = !!navigator.platform.match(/Mac/i);
 /**
  * The factory MIME type supported by phosphor dock panels.
  */
-const FACTORY_MIME = 'application/x-phosphor-widget-factory';
+const FACTORY_MIME = 'application/vnd.phosphor.widget-factory';
 
 
 /**

+ 8 - 3
src/notebook/output-area/widget.ts

@@ -18,7 +18,7 @@ import {
 } from 'phosphor/lib/core/signaling';
 
 import {
-  Drag, DropAction
+  Drag
 } from 'phosphor/lib/dom/dragdrop';
 
 import {
@@ -54,7 +54,7 @@ const DRAG_THRESHOLD = 5;
 /**
  * The factory MIME type supported by phosphor dock panels.
  */
-const FACTORY_MIME = 'application/x-phosphor-widget-factory';
+const FACTORY_MIME = 'application/vnd.phosphor.widget-factory';
 
 /**
  * The class name added to an output area widget.
@@ -417,7 +417,12 @@ class OutputAreaWidget extends Widget {
       let rect = this.node.getBoundingClientRect();
       let oldHeight = this.node.style.minHeight;
       this.node.style.minHeight = `${rect.height}px`;
-      setTimeout(() => { this.node.style.minHeight = oldHeight; }, 50);
+      setTimeout(() => {
+        if (this.isDisposed) {
+          return;
+        }
+        this.node.style.minHeight = oldHeight;
+      }, 50);
 
       let oldValues = args.oldValue as nbformat.IOutput[];
       for (let i = args.oldIndex; i < oldValues.length; i++) {

+ 2 - 0
test/src/index.ts

@@ -39,3 +39,5 @@ import './notebook/notebook/widgetfactory.spec';
 
 import './notebook/output-area/model.spec';
 import './notebook/output-area/widget.spec';
+
+import 'phosphor/styles/base.css';