This commit is contained in:
Van 2015-03-01 21:28:30 +08:00
parent 9e920eff93
commit 92bee6437b
2 changed files with 13 additions and 7 deletions

View File

@ -22,7 +22,7 @@ var playground = {
return false; return false;
} }
if (config.embed) { if (config.embed) {
$("#editorDiv").parent().height($(window).height() - 35 - $(".footer").height()); $("#editorDiv").parent().height($(window).height() - 33 - $(".footer").height());
playground.editor.setSize("auto", ($("#editorDiv").parent().height() * 0.7) + "px"); playground.editor.setSize("auto", ($("#editorDiv").parent().height() * 0.7) + "px");
} else { } else {
$("#editor, #output").height($(window).height() - 60 - $(".footer").height()); $("#editor, #output").height($(window).height() - 60 - $(".footer").height());
@ -191,6 +191,12 @@ var playground = {
playground._resize(); playground._resize();
}); });
if (config.embed) {
playground.editor.setSize("auto", ($("#editorDiv").parent().height() * 0.7) + "px");
} else {
playground.editor.setSize("auto", $("#editor").height() + "px");
}
var hovered = false; var hovered = false;
$(".menu .ico-share").hover(function () { $(".menu .ico-share").hover(function () {
$(".menu .share-panel").show(); $(".menu .share-panel").show();

View File

@ -61,7 +61,7 @@
</div> </div>
<div class="fn-clear"> <div class="fn-clear">
<div id="editorDiv" class="fn-none"> <div id="editorDiv" class="fn-none">
<textarea id='editor'>{{.code}}</textarea> <textarea rows="20" id='editor'>{{.code}}</textarea>
</div> </div>
<textarea id="output" rows="20" readonly="readonly" ></textarea> <textarea id="output" rows="20" readonly="readonly" ></textarea>
</div> </div>