修正全屏

This commit is contained in:
joyqi
2013-11-04 10:14:03 +08:00
parent ce38fcd55b
commit 7618468df2
2 changed files with 11 additions and 4 deletions
+9 -2
View File
@@ -131,17 +131,24 @@ $(document).ready(function () {
editor.hooks.chain('enterFakeFullScreen', function () {
th = textarea.height();
$(document.body).addClass('fullscreen');
textarea.css('height', $(window).height() - toolbar.outerHeight());
var h = $(window).height() - toolbar.outerHeight();
textarea.css('height', h);
preview.css('height', h);
});
editor.hooks.chain('enterFullScreen', function () {
$(document.body).addClass('fullscreen');
textarea.css('height', window.screen.height - toolbar.outerHeight());
var h = window.screen.height - toolbar.outerHeight();
textarea.css('height', h);
preview.css('height', h);
});
editor.hooks.chain('exitFullScreen', function () {
$(document.body).removeClass('fullscreen');
textarea.height(th);
preview.css('height', 'auto');
});
editor.run();