소스 검색

Merge pull request #2589 from ellisonbg/vega-debug

Minor bug fixes and style improvements for Vega package
Steven Silvester 7 년 전
부모
커밋
8e046d1c9b
2개의 변경된 파일7개의 추가작업 그리고 9개의 파일을 삭제
  1. 5 3
      packages/vega/src/index.ts
  2. 2 6
      packages/vega/style/index.css

+ 5 - 3
packages/vega/src/index.ts

@@ -90,7 +90,9 @@ class RenderedVega extends Widget implements IRenderMime.IRenderer {
     let updatedData: JSONObject;
     if (this._mode === 'vega-lite') {
       updatedData = Private.updateVegaLiteDefaults(data as ReadonlyJSONObject);
-    }  
+    } else {
+      updatedData = data as JSONObject;
+    }
 
     let embedSpec = {
       mode: this._mode,
@@ -158,7 +160,7 @@ const extensions: IRenderMime.IExtension | IRenderMime.IExtension[] = [
     dataType: 'json',
     documentWidgetFactoryOptions: {
       name: 'Vega',
-      fileExtensions: ['.vg', '.vg.json', 'json'],
+      fileExtensions: ['.vg', '.vg.json', '.json'],
       defaultFor: ['.vg', '.vg.json'],
       readOnly: true
     }
@@ -171,7 +173,7 @@ const extensions: IRenderMime.IExtension | IRenderMime.IExtension[] = [
     dataType: 'json',
     documentWidgetFactoryOptions: {
       name: 'Vega-Lite',
-      fileExtensions: ['.vl', '.vl.json', 'json'],
+      fileExtensions: ['.vl', '.vl.json', '.json'],
       defaultFor: ['.vl', '.vl.json'],
       readOnly: true
     }

+ 2 - 6
packages/vega/style/index.css

@@ -4,14 +4,10 @@
 |----------------------------------------------------------------------------*/
 
 
-.jp-RenderedVegaCommon .vega-actions {
-  font-size: var(--jp-ui-font-size1);
-  color: var(--jp-ui-font-color1);
-}
-
-
 .jp-RenderedVegaCommon .vega-actions a {
   margin-right: 8px;
+  font-size: var(--jp-ui-font-size1);
+  color: var(--jp-ui-font-color2);
 }