浏览代码

Add semantic class name as suggested by @SylvainCorlay

danielballan 8 年之前
父节点
当前提交
d4caf9effb
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      src/notebook/output-area/widget.ts

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

@@ -57,6 +57,11 @@ const FACTORY_MIME = 'application/x-phosphor-widget-factory';
  */
 const OUTPUT_AREA_CLASS = 'jp-OutputArea';
 
+/**
+ * The class name added to a "mirrored" output area widget created by a drag.
+ */
+const MIRRORED_OUTPUT_AREA_CLASS = 'jp-MirroredOutputArea';
+
 /**
  * The class name added to an output widget.
  */
@@ -144,10 +149,12 @@ class OutputAreaWidget extends Widget {
 
   get mirror(): OutputAreaWidget {
     let rendermime = this._rendermime;
-    let widget = new OutputAreaWidget({ rendermime });
+    let renderer = this._renderer;
+    let widget = new OutputAreaWidget({ rendermime, renderer });
     widget.model = this._model;
     widget.title.text = 'Mirrored Output';
     widget.title.closable = true;
+    widget.addClass(MIRRORED_OUTPUT_AREA_CLASS);
     return widget;
   }