Skip to content

Commit

Permalink
final csv/json data preview alpha changes for #30 feature release
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomFractals committed May 18, 2019
1 parent 427db31 commit 0a48506
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
Binary file added images/vega-viewer-data-preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-vega-viewer",
"displayName": "Vega Viewer",
"description": "Vega Viewer",
"version": "4.6.0",
"version": "5.0.0",
"publisher": "RandomFractalsInc",
"author": "Taras Novak",
"contributors": [
Expand Down
4 changes: 2 additions & 2 deletions src/vega.preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class VegaPreviewSerializer implements WebviewPanelSerializer {

async deserializeWebviewPanel(webviewPanel: WebviewPanel, state: any) {
const logger = new Logger('vega.preview.serializer:', LogLevel.Debug); // .Info for prod
logger.logMessage(LogLevel.Debug, 'deserializeWeviewPanel(): url:', state.uri.toString());
logger.logMessage(LogLevel.Info, 'deserializeWeviewPanel(): url:', state.uri.toString());
previewManager.add(
new VegaPreview(
this.extensionPath,
Expand All @@ -50,7 +50,7 @@ export class VegaPreview {
private _title: string;
private _html: string;
private _panel: WebviewPanel;
private _logger = new Logger('vega.preview:', LogLevel.Debug); // .Info for prod
private _logger = new Logger('vega.preview:', LogLevel.Info); // change to .Debug for debug

/**
* Creates new Vega preview.
Expand Down
14 changes: 9 additions & 5 deletions templates/data.preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@
font-size: 11pt;
text-align: center;
}
perspective-viewer {
width: 100%;
height: 100%;
#data-viewer {
position: absolute;
top: 36px;
bottom: 0;
left: 0;
right: 0;
border: 1px solid #999;
}
</style>
</head>
Expand All @@ -61,12 +65,12 @@
<div style="float: right; width: 180px;">
data:
<select id="data-selector" onChange="changeData()">
</select> &nbsp;
</select>
</div>
<h3 id="title">loading...</h3>
</div>
<div id="message">Loading data preview...</div>
<perspective-viewer view="grid"></perspective-viewer>
<perspective-viewer id="data-viewer" view="grid"></perspective-viewer>
<script type="text/javascript">
let vscode, viewer, message, data, title, dataSelector, selectedData = '';
// check web assembly support
Expand Down

0 comments on commit 0a48506

Please sign in to comment.