Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jspenguin2017 committed Dec 11, 2017
1 parent c4267e0 commit 23012e4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/asset-viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
font: 12px monospace;
white-space: pre;
}
html, body, #content {
margin: 0;
height: 100%;
}
</style>
</head>
<body>
Expand All @@ -19,6 +23,11 @@
<script src="js/vapi-common.js"></script>
<script src="js/vapi-client.js"></script>
<script src="js/udom.js"></script>
<!-- Patch 2017-12-11: Optimize asset viewer -->
<script src="js/ace-1.2.9.js"></script>
<script src="js/ace-ext-searchbox-1.2.9.js"></script>
<script src="js/nano-highlight.js"></script>
<script src="js/nano-ide.js"></script>
<script src="js/asset-viewer.js"></script>

</body>
Expand Down
6 changes: 5 additions & 1 deletion src/js/asset-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
/******************************************************************************/

var onAssetContentReceived = function(details) {
uDom('#content').text(details && (details.content || ''));
if ( details && details.content ) {
var editor = ace.edit('content');
nanoIDE.init(editor, true, true);
editor.setValue(details.content, -1);
}
};

/******************************************************************************/
Expand Down

0 comments on commit 23012e4

Please sign in to comment.